1 / 24

Number Systems

Number Systems. Common Number Systems. Quantities/Counting (1 of 3). Quantities/Counting (2 of 3). Quantities/Counting (3 of 3). Conversion Among Bases. The possibilities:. Decimal. Octal. Binary. Hexadecimal. Decimal to Decimal (just for fun). Decimal. Octal. Binary. Hexadecimal.

dragon
Download Presentation

Number Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Number Systems

  2. Common Number Systems

  3. Quantities/Counting (1 of 3)

  4. Quantities/Counting (2 of 3)

  5. Quantities/Counting (3 of 3)

  6. Conversion Among Bases • The possibilities: Decimal Octal Binary Hexadecimal

  7. Decimal to Decimal (just for fun) Decimal Octal Binary Hexadecimal

  8. Weight 12510 => 5 x 100 = 5 2 x 101 = 20 1 x 102 = 100 125 Base

  9. Binary to Decimal Decimal Octal Binary Hexadecimal

  10. Binary to Decimal • Technique • Multiply each bit by 2n, where n is the “weight” of the bit • The weight is the position of the bit, starting from 0 on the right • Add the results

  11. Example Bit “0” 1010112 => 1 x 20 = 1 1 x 21 = 2 0 x 22 = 0 1 x 23 = 8 0 x 24 = 0 1 x 25 = 32 4310

  12. Decimal to Binary Decimal Octal Binary Hexadecimal

  13. Decimal to Binary • Technique • Divide by two, keep track of the remainder • First remainder is bit 0 (LSB, least-significant bit) • Second remainder is bit 1 • Etc.

  14. 2 125 62 1 2 31 0 2 15 1 2 3 1 2 7 1 2 0 1 2 1 1 Example 12510 = ?2 12510 = 11111012

  15. Common Powers (1 of 2) • Base 10

  16. Common Powers (2 of 2) • Base 2 • What is the value of “k”, “M”, and “G”? • In computing, particularly w.r.t. memory, the base-2 interpretation generally applies

  17. / 230 = Example In the lab…1. Double click on My Computer2. Right click on C:3. Click on Properties

  18. Review – multiplying powers • For common bases, add powers ab ac = ab+c 26 210 = 216 = 65,536 or… 26 210 = 64  210 = 64k

  19. Binary Addition (1 of 2) • Two 1-bit values “two” pp. 36-38

  20. Binary Addition (2 of 2) • Two n-bit values • Add individual bits • Propagate carries • E.g., 1 1 10101 21+ 11001 + 25 101110 46

  21. Multiplication (2 of 3) • Binary, two 1-bit values

  22. Multiplication (3 of 3) • Binary, two n-bit values • As with decimal values • E.g., 1110 x 1011 1110 1110 0000 111010011010

  23. Fractions • Binary to decimal 10.1011 => 1 x 2-4 = 0.0625 1 x 2-3 = 0.125 0 x 2-2 = 0.0 1 x 2-1 = 0.5 0 x 20 = 0.0 1 x 21 = 2.0 2.6875

  24. Fractions • Decimal to binary .14579x 20.29158x 20.58316x 21.16632x 20.33264x 20.66528x 21.33056 etc. 3.14579 11.001001...

More Related