1 / 13

Number Systems

Number Systems. Today. Decimal Hexadecimal Binary Unsigned Binary 1’s Complement Binary 2’s Complement Binary. Decimal (base 10). ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ). Binary (base 2). ( 0, 1 ). Hexadecimal (base 16). ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F ).

jamese
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. Today • Decimal • Hexadecimal • Binary • Unsigned Binary • 1’s Complement Binary • 2’s Complement Binary

  3. Decimal(base 10) ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ) Binary(base 2) ( 0, 1 ) Hexadecimal(base 16) ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F )

  4. How do we represent numbers? Decimal: 100 = 1101 = 10102 = 100103 = 1000104 = 10000105 = 100000 . . . . Example: Decimal 1024 = (1024)10 Binary: 20 = 121 = 222 = 423 = 824 = 1625 = 3226 = 6427 = 12828 = 25629 = 512210 = 1024 = 1 Kb220 = 1 Mb230 = 1 Gb240 = 1 Tb

  5. Notes: Counting Chart ( 99 )10 + 1 = ?? ( FF )16 + 1 = ?? ( 100 )10 ( 100 )16

  6. Conversion • Decimal (Base 10) --> Binary (Base 2) Step 1 - Divide the Number by 2 Step 2 - If the result has a remainder, --> add 1 as the current MSB Otherwise --> add 0 as the current MSB Step 3 - Finish when result < base --> Add Quotient as the final MSB Example: Convert (1000)10 to Binary (base 2)

  7. Conversion • Decimal (Base 10) -> Hexadecimal (Base 16) Step 1 - Divide the Number by 16 Step 2 - Take the remainder as the current MSB Step 3 - Finish when result < base --> Add Quotient as the final MSB Example: Convert (1000)10 to Hexadecimal (base 16)

  8. Bits & Bytes (Side Note) • Bit A bit is a single binary digit, a ‘1’ or a ‘0’ • Byte A series of 8 bits ( 8 bits = 1 Byte ) Examples: ( 1010 1010 )2 ( AA )16

  9. Conversion • Binary (Base 2) --> Hexadecimal (Base 16) Step 1 - Make groups of 4 bits, starting from the LSB Step 2 - Directly convert each group into Hexadecimal Example: Convert (1111101000)2 to Hexadecimal (base 16)

  10. Binary Addition Example: Add (10011011)2 and (1110)2

  11. Signed Binary • MSB is the sign bit 0 <-- Positive Numbers1 <-- Negative Numbers

  12. 2’s Complement Binary • Example: Convert (-100)10 into 2’s comp • Example: Binary Addition

  13. 2’s Complement Binary • Why? • Simplifying the implementation of arithmetic on computer hardware. • Allows the addition of negative operands without a subtraction circuit or a circuit that detects the sign of a number. • Moreover, an addition circuit can also perform subtraction by taking the two's complement of a number

More Related