Negative Integer: (-26)10 = | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 |
Positive Integer: (38)10 = | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 |
The two’s complement of a positive number N in base r with n digits is rn - N for N ≠ 0 and 0 for N = 0.Two’s complement representation is useful to processor designers because a single digital circuit can handle both addition and subtraction. The following two steps can also be used to find the two’s complement of a binary integer. The two’s complement operation is reversible.
One day Dan asks Bob, “So Bob what did you get for Christmas?” Then Bob says to Dan, “Oh see that brand new red Ferrari outside?” Dan says, “OOOOH WOW!!!” Bob says, “Ya, I got the same exact color tie!” |