Subtractors

Subtractors

Published by: Nuru

Published date: 22 Jun 2021

Subtractors Photo

Subtractors

The subtraction of two binary numbers may be accomplished by taking the complement of the subtrahend and adding it to the minuend. By this method, the subtraction operation becomes an additional operation requiring full-adders for its machine implementation. It is possible to implement subtraction with logic circuits in a direct manner, as done with paper and pencil. By this method, each subtrahend bit of the number is subtracted from its corresponding significant minuend bit to form a difference bit. If the minuend bit is smaller than the subtrahend bit, a 1 is borrowed from the next significant position. Just as there are half-and full- adders, there are half- and full-subtractors.

1. Half-Subtractors

  • A half-subtractor is a combinational circuit that subtracts two bits and produces their difference bit.
  • Denoting minuend bit by x and the subtrahend bit by y. To perform x - y, we have to check the relative magnitudes of x and y:
    If x≥ y, we have three possibilities: 0 - 0 = 0, 1 - 0 = 1, and 1 - 1 = 0.
    If x < y, we have 0 - 1, and it is necessary to borrow a 1 from the next higher stage which adds 2 to minuend bit.
  • The half-subtractor needs two outputs, difference(D) and borrow(B).

Truth Table:

X Y B D
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0

Boolean Expression:

D = x'y + xy'
B = x'y

Implementation:

Subtractors

2. Full-Subtractor

  • A full-subtractor is a combinational circuit that performs a subtraction between two bits, taking into account that a 1 may have been borrowed by a lower significant stage.
  • This circuit has three inputs and two outputs. The three inputs, x, y, and z, denote the minuend, subtrahend, and previous borrow,
    respectively. The two outputs, D and B, represent the difference and output-borrow, respectively.

Truth Table:

 

X Y Z B D
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 1 0
1 0 0 0 1
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
  • The 1's and 0's for the output variables are determined from the subtraction of x - y - z.
  • The combinations having input borrow z = 0 reduce to the same four conditions of the half-adder.
  • For x = 0, y = 0, and z = 1, we have to borrow a 1 from the next stage, which makes B = 1 and adds 2 to x. Since 2 - 0 - 1 = 1, D = 1.
  • For x = 0 and y z = 1 1, we need to borrow again, making B = 1 and x = 2. Since 2 - 1 - 1 = 0, D = 0.
  • For x = 1 and y z = 0 1, we have x - y - z = 0, which makes B = 0 and D = 0.
  • Finally, for x = 1, y = 1, z =1 , we have to borrow 1, making B = 1 and x = 3, and 3 - 1 - 1 = 1, making D=1.

The simplified Boolean functions for the two outputs of the full-subtractor are derived in the maps:

Subtractors