A simple Subtract circuit
Easiest way to implement subtraction
Fact:
Subtraction
=
addition
of the
negated value
Negating
a
binary number
(from
CS255
):
Flip
each bit (= apply
not
on each bit)
Add 1
to the result.
Here is a
4-bit subtract circuit
constructed using a
4-bit adder circuit
:
The
logic-sim
circuit is here:
click here
(Note: final "carry bit" in the
adder circuit
must be
inverted
on obtain the
borrow indication
)