Why is it that addition of the 2's complement is an efficient method of subtracting? Does this simplify the circuit?

# Electronic – Addition and subtraction in digital electronics

digital-logicmath

Skip to content
# Electronic – Addition and subtraction in digital electronics

digital-logicmath

Why is it that addition of the 2's complement is an efficient method of subtracting? Does this simplify the circuit?

## Best Answer

As Olin pointed out in his comment, A - B and A + (-B) are the same thing, but note the latter actually uses addition.

So with 2's compliment, you only need one kind of circuit to do addition/subtraction, namely an adder (instead of an adder and a separate subtracter, plus the circuitry to switch the data bus back and forth between the two).

Taking the two's complement of a number involves first taking the 1's complement (toggling all of the bits, a trivial logic operation) and then adding one. The latter seems to require a separate adder to perform that step before adding the two operands, but we can get by with just one adder circuit by setting the carry in lead of the first bit of the adder to high when doing subtraction, and low when doing addition.