twos complement

« BACK TO DICTIONARY INDEX

(n.) A system that represents negative numbers with binary data. Each bit of the number is inverted. Then 1 (000…00001) is added (ignoring overflow). Using all 1s to represent –1 avoids the two representations for 0 found in ones complement. This procedure simplifies the logic required for addition and subtraction but introduces complexity for negation. The examples below show the application of this concept.

000…00011 = +3
000…00010 = +2
000…00001 = +1
000…00000 = 0
111…11111 = –1
111…11110 = –2
111…11101 = –3