Signed Integers


Signed binary integers can be either positive or negative. The most significant bit (MSB) indicates the number’s sign. A value of 0 indicates that the integer is positive, and 1 indicates that it is negative. For example,

 Negative Integer:   (-26)10 = 1 1 1 0 0 1 1 0
 Positive Integer:   (38)10 = 0 0 1 0 0 1 1 0

Two’s Complement Notation
Negative integers are represented by using two’s complement representation, which is the integer’s additive inverse. Adding an integer’s additive inverse to the integer itself gives a value zero. Its definition is
The two’s complement of a positive number N in base r with n digits is rn - N for N ≠ 0 and 0 for N = 0.
Two’s complement representation is useful to processor designers because a single digital circuit can handle both addition and subtraction. The following two steps can also be used to find the two’s complement of a binary integer. The two’s complement operation is reversible.

 Starting value:   (44)10 = (00101100)2   0 0 1 0 1 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
 Sum  
 2’s complement notation of (-44)10 is   ( )2        

 Starting value:   (-26)10 = (11100110)2   1 1 1 0 0 1 1 0
 Step 1: Reverse the bits  
 Step 2: Add 1 to the value from Step 1   + 0 0 0 0 0 0 0 1
 Sum  
 2’s complement of (-26)10 is   ( )2        



      One day Dan asks Bob, “So Bob what did you get for Christmas?”    
      Then Bob says to Dan, “Oh see that brand new red Ferrari outside?”    
      Dan says, “OOOOH WOW!!!”    
      Bob says, “Ya, I got the same exact color tie!”