Wednesday, October 9, 2013

Two's Complement Binary Addition

 -39 + 92 = 53:

1111
11011001
+01011100
00110101
Carryout without overflow. Sum is Correct.

104 + 45 = 149:
111
01101000
+00101101
10010101
Overflow, no carryout. Sum is not correct.

 10 + -3 = 7:
11111
00001010
+11111101
00000111
Carryout without overflow. Sum is correct.

-1 + 1 = 0:
11111111
11111111
+00000001
00000000
Carryout without overflow. Sum is correct.

No comments:

Post a Comment