Slide 3.6: Signed integers
Slide 3.8: Signed integers (cont.)
Home

Signed Integers (Cont.)


Two's Complement of Hexadecimal
An easy way to reverse the bits of a hexadecimal digit is to subtract the digit from 15.

 Starting value:   (15,268)10 = (3BA4)16   3 B A 4
 Step 1: Reverse the digits  
 Step 2: Add 1 to the value from Step 1 + 0 0 0 1
 Sum  
 2's complement notation of (-15,268)10 is ( )16        

Converting Signed Binary to Decimal
 Starting value: (11010100)2   1 1 0 1 0 1 0 0
 Step 1: Reverse the bits  
 Step 2: Add 1 to the value from Step 1 + 0 0 0 0 0 0 0 1
 Step 3: Form the two's complement  
 Step 4: Convert to decimal negative ( )2 = ( )10

               

Converting Signed Decimal to Binary
 Starting value: (-38)10 (-38)10
 Step 1: Convert the absolute value to binary  
 Step 2: Reverse the bits  
 Step 3: Add 1 to the value from Step 2 + 0 0 0 0 0 0 0 1
 Step 4: Form the two's complement  
 2's complement notation of (-38)10 is ( )2