Nah, a subtractor IS an adder, it just prepares the value with trickery.
In binary, -X = NOT(X)+1
E.g.
1001 = 9
0110 = NOT(9)
0111 = -9
Now, that clearly = 7, not -9. The trick is that in binary, they're equivalent.
E.g.
0000 1001 = 9
1111 0110 = NOT(9)
1111 0 111 = -9
In any number of bits, this quality of a positive number being equivalent to a negative number holds.
Binary subtraction exploits this by changing a request for A - B into A + (-B).
All it has to do to accomplish this is to take the NOT of each input and force a carry-bit into the ones digit adder.
A binary subtractor IS a binary adder with one extra gate.




Reply With Quote