Signed Integers (Cont.)


Converting Signed Decimal to Hexadecimal
 Starting value: (-1462)10 (-1462)10
 Step 1: Convert the absolute value to hexadecimal  
 Step 2: Reverse the digits  
 Step 3: Add 1 to the value from Step 2 + 0 0 0 1
 Step 4: Form the two’s complement  
 2’s complement notation of (-1462)10 is   ( )16

Converting Signed Hexadecimal to Decimal
 Starting value: (8A20)16   8 A 2 0
 Step 1: Reverse the digits  
 Step 2: Add 1 to the value from Step 1 + 0 0 0 1
 Step 3: Form the two's complement  
 Step 4: Convert to decimal   negative ( )16 = ( )10        

Maximum and Minimum Values
A signed integer of n bits uses only n-1 bits to represent its magnitude.

Storage Type Maximum Values Minimum Values
 Signed byte (01111111)2 = 27 – 1 = (127)10 (10000000)2 = -27 = (-128)10
 Signed halfword (0111111111111111)2
= 215 – 1 = (32,767)10
(1000000000000000)2
= -215 = (-32,768)10




      “A man is not called wise because he talks and talks again;    
      but if he is peaceful, loving and fearless then he is in truth called wise.”    
      ― Dhammapada, The Dhammapada: The Sayings of the Buddha