Home

Subtractor

A subtractor is a digital logic circuit that performs subtraction of binary numbers. It is the counterpart of an adder and is used in arithmetic units of processors and other digital systems. The circuit takes one or more minuend bits, subtrahend bits, and, for multi-bit subtraction, a borrow input, and outputs a difference bit along with a borrow signal.

The basic building blocks are the half subtractor and the full subtractor. A half subtractor accepts two

Implementation and variations: In hardware, subtractors are built from logic gates. They can also perform subtraction

Analog subtractors: In analog electronics, subtractor circuits using operational amplifiers create a difference between two input

See also: adder, arithmetic logic unit, two's complement, differential amplifier.

inputs,
A
(the
minuend)
and
B
(the
subtrahend),
and
produces
Difference
D
=
A
XOR
B
and
Borrow
B_out
=
NOT
A
AND
B.
A
full
subtractor
accepts
A,
B,
and
a
borrow-in
Bin.
It
yields
D
=
A
XOR
B
XOR
Bin
and
Bout
=
(NOT
A
AND
B)
OR
(Bin
AND
(NOT
A
OR
B)).
These
can
be
chained
to
perform
subtraction
of
multi-bit
numbers,
producing
the
final
borrow-out.
by
using
an
adder
with
the
subtrahend
complemented
and
an
initial
borrow-in
of
1,
i.e.,
A
+
(~B)
+
1.
This
approach
allows
reuse
of
existing
adder
designs.
Subtraction
is
often
performed
as
two's
complement
addition
in
modern
architectures.
Subtractors
can
be
arranged
in
ripple-borrow
or
look-ahead
configurations
to
optimize
speed.
voltages.
A
common
topology
is
the
subtractor
or
differencing
amplifier,
which
yields
an
output
proportional
to
the
difference
of
the
inputs
according
to
a
resistor
network.