I've been trying to convert a full adder to a full subtractor using an inverter.
I tried using not gates at the B input ( in A B Cin ) and also using it in the outputs but the final answers are not matching.
Electrical – Converting full adder to subtractor using inverter
adderdigital-logicinverterlogic-gates
Best Answer
Inverting all bits gives you the ones complement and I assume you want to work in twos-complement format.
To make a number negative in twos-complement format you can do a ones-complement (invert all bits) followed by addition of 1.
Thus you can convert an adder to a subtractor using the two's complement but that requires another adder :-).
However there is a trick you can use sometimes: if your adder has an unused carry-in port you can use that to perform the extra "add-one".