## Subtractor:

Subtractor is the subtractor of binary numbers. This combinational logic circuit can be used to subtract two or more binary numbers. So you need to know the general rules of binary subtraction. For example 0-0= 00, 0-1= 11, 1-0= 01, 1-1= 00. In this case the subtraction is represented by two bits where the leftmost bit represents Borrow and the rightmost bit represents Difference.** Subtractors are of two types**. Namely –

- Half Subtractor
- Full Subtractor

## Half Subtractor:

A half subtractor is a special type of combinational logic circuit, which can be used to subtract two bits. Subtractor and Borrow are calculated by subtracting two bits (x and y) with the help of half subtractor. The half subtractor truth table is shown-

### From the truth table we get:

D (Difference) = 1 then,

When x = 0 and y = 0 from the truth table

∴ D=x.y [Remember: If x or y has value 0 (zero), bar ( ‾‾ ) sits on its head]

Again D (Difference) = 1,

When x = 1 and y = 0 from the truth table

∴ D = x.y

So, D = x.y + x.y [The two are OR (+).]

D (Difference) = x⊕y

Again, looking at Borrow or B, we find that B=1 if x=0 and y=1.

∴ B = x.y

In this case, the subtraction and Borrow and Boolean equation are –

D (Difference) = x⊕y [D = x XOR y]

Borrow(B) = x.y [NOT x AND y]

So the logic circuit for the half subtractor logic gate is a combination of XOR gate for Difference (D) and NOT and AND gates for Borrow(B).

## Full Subtractor:

A Full Subtractor is a combinational logic circuit that calculates the subtraction of three or more bits. Like Half Subtractor, Full Subtractor and subtraction between three bits is determined by subtraction and Borrow.

### From the truth table we get:

Boolean equation of D (Difference) and B_{0} (Borrow) from truth table is –

D= x yB_{i}
+
xyB_{i}
+
x yB_{i}
+
xyB_{i}

=x⊕(y⊕B_{i}) [Difference = x XOR y XOR B_{i} ]

B_{0} = x yB_{i} + xyB_{i} + xyB_{i} + xyB_{i}

= x yB_{i} +
xyB_{i} + xyB_{i} + xyB_{i}

=B_{i}(x y + xy) + xy((B_{i} + B_{i})

=B_{i}(x⊕y + xy.1) [we know A + A = 1]

=B_{i}(x⊕y) + xy

Then the logic circuit we can construct for full subtractor from Boolean equation is shown.

In fact, two half subtractors are connected in series and form a full subtractor with the help of an OR gate. The full subtractor logic diagram is shown

## Frequently Asked Question (FAQs):

- What is Subtractor?
- Half Subtractor.
- Full Subtractor.