ADC home pageIntroductionGoalsWhy digitize?Number RepresentationDigital to AnalogAnalog to DigitalApplicationsLiterature Citations

2's Complement Binary Numbers

Choose Subtopic

Exercise: For an 8 bit binary word, write down -3 in two's complement binary. 
You might start by writing down +3, then complementing and incrementing. 

Exercise: Compute 3-5 and 5-3 (answers obviously ±2) in two's complement binary. 

By now, you've figured out that 111111 is -1, 111110 is -2, and so on. If we have a 4 bit number, 1001 is (complement: 0110; increment: 0111) -7. But what is 1000? By convention, that's -8, NOT 8. Why? A lead 1 is taken as negative (just as in Sign Plus Magnitude Binary). So if we have N bits in the binary representation, we can express numbers from -2N-1 to +2N-1 - 1. For N = 4, that's -8 to +7.

In a Nutshell: Two's complement binary allows representation of both positive and negative integers, allows for easy sign change, and allows subtraction (or addition of numbers with signs) more easily than sign plus magnitude coding.

   
 

 

University of Illinois Homepage The Camille & Henry Dreyfus Foundation Homepage Home Scheeline Group Home Page Univ. of Illinois at Urbana-Champaign Home Page Department of Chemistry Home Page Creative Commons License System Homepage