Visual Reference Subtractor Wikipedia A Full Subtractor is a digital circuit that performs the subtraction of three binary bits: two significant bits and a borrow-in bit (from...
A Full Subtractor is a digital circuit that performs the subtraction of three binary bits: two significant bits and a borrow-in bit (from a previous subtraction). It is an extension of the Half Subtractor, which can only subtract two bits and does not handle a borrow-in input. The Full Subtractor takes into account the borrow from previous stages of subtraction and produces two outputs: the Difference (D) and the Borrow-out (B_out).
Inputs and Outputs of a Full Subtractor
Inputs:
A: The minuend (the bit from which we subtract).
B: The subtrahend (the bit that we subtract).
Borrow-in (B_in): The borrow bit from a previous subtraction (if any).
Outputs:
Difference (D): The result of the subtraction of A, B, and Borrow-in.
Borrow-out (B_out): The borrow bit that indicates whether a borrow is needed when subtracting (i.e., if A - B - Borrow-in results in a negative number).
Truth Table of a Full Subtractor
The Full Subtractor performs binary subtraction based on the following truth table:
A
B
Borrow-in (B_in)
Difference (D)
Borrow-out (B_out)
0
0
0
0
0
0
0
1
1
1
0
1
0
1
1
0
1
1
0
1
1
0
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
1
1
0
Explanation of the Truth Table:
When A = 0, B = 0, and Borrow-in = 0:
The Difference (D) is 0, and there is no borrow, so Borrow-out = 0.
When A = 0, B = 0, and Borrow-in = 1:
The Difference (D) is 1, and there is a borrow, so Borrow-out = 1.
When A = 0, B = 1, and Borrow-in = 0:
The Difference (D) is 1, and there is a borrow, so Borrow-out = 1.
When A = 0, B = 1, and Borrow-in = 1:
The Difference (D) is 0, and there is a borrow, so Borrow-out = 1.
When A = 1, B = 0, and Borrow-in = 0:
The Difference (D) is 1, and there is no borrow, so Borrow-out = 0.
When A = 1, B = 0, and Borrow-in = 1:
The Difference (D) is 0, and there is no borrow, so Borrow-out = 0.
When A = 1, B = 1, and Borrow-in = 0:
The Difference (D) is 0, and there is no borrow, so Borrow-out = 0.
When A = 1, B = 1, and Borrow-in = 1:
The Difference (D) is 1, and there is no borrow, so Borrow-out = 0.
Boolean Equations for Difference and Borrow-out
The outputs of the Full Subtractor can be expressed using Boolean algebra as follows:
Difference (D):
The Difference output is equivalent to the XOR of the three input bits A, B, and Borrow-in.
D=A⊕B⊕Bin
This equation shows that the difference is 1 when an odd number of the inputs (A, B, and B_in) are 1.
Borrow-out (B_out):
The Borrow-out output is 1 if a borrow is required from previous stages. The borrow condition occurs when B and Borrow-in are 1, or when A is less than B (and possibly needs a borrow).
Full subtractors are used in multi-bit binary subtractors. By chaining Full Subtractors together, subtraction of multi-bit numbers can be achieved, much like in addition circuits.
Arithmetic Logic Units (ALUs):
Full Subtractors are part of ALUs in processors, where they perform subtraction operations in addition to other arithmetic and logic operations.
Digital Signal Processing:
Full Subtractors are used in applications like signal comparison, error detection, and digital filters, where binary subtraction is necessary.
Counters and Digital Systems:
Full Subtractors are useful in digital counters, data comparison systems, and systems requiring binary subtraction with carry/borrow handling.
Conclusion
The Full Subtractor is a crucial component in digital electronics that allows the subtraction of three binary digits: two significant bits and a borrow-in. It produces two outputs: the Difference and the Borrow-out. The Full Subtractor is used in multi-bit binary subtraction circuits, Arithmetic Logic Units (ALUs), and many other digital systems, where handling borrow conditions from previous operations is essential for accurate subtraction.