------------------------------------------------------------------------------
MC logo
Two's Complement Binary Addition Examples
[^] Two's Complement Operation   [^^][^^] Binary/Boolean Main Index
------------------------------------------------------------------------------
[Decimal to Two's Complement Conversion] [Two's Complement to Decimal Conversion] [Two's Complement Binary Addition Examples]
Here are some examples of eight-bit, twos complement binary addition. In each case, we compute the sum, and note if there was an overflow. If there was a carry out, the extra bit is shown on the next line. (It's falling into the bit bucket, where it will never be heard from again.) You can also look at the rules for determining overflow.
-39 + 92 = 53:
1 111
11011001
+01011100
00110101
Carryout without overflow. Sum is correct.
-19 + -7 = -26:
1 11111
11101101
+11111001
11100110
Carryout without overflow. Sum is correct.
44 + 45 = 89:
111
00101100
+00101101
01011001
No overflow nor carryout.
104 + 45 = 149:
111
01101000
+00101101
10010101
Overflow, no carryout. Sum is not correct.
-75 + 59 = -16:
111111
10110101
+00111011
11110000
No overflow nor carryout.
-103 + -69 = -172:
1 11111
10011001
+10111011
01010100
Overflow, with incidental carryout. Sum is not correct.
10 + -3 = 7:
1 1111
00001010
+11111101
00000111
Carryout without overflow. Sum is correct.
127 + 1 = 128:
1111111
01111111
+00000001
10000000
Overflow, no carryout. Sum is not correct.
-1 + 1 = 0:
1 1111111
11111111
+00000001
00000000
Carryout without overflow. Sum is correct.