
Site Search
SECTION I-10: 2's Complement of Binary Number
To get the 2's complement of a Binary number, invert all the bits and then add 1 to the result. Inverting the bits is simply a matter of changing all 0's to 1's and 1's to 0's. This is called the 1's complement. Example is demonstrated below.
Take the 2's complement of 10011101 | |
---|---|
10011101 | Binary Number |
01100010 | 1's Complement |
+ 1 | |
01100011 | 2's Complement |