Subtracters are combinational circuits used to perform binary subtraction. Similar to adders, subtracters are designed to compute the difference between two binary numbers. Subtracters are fundamental in digital systems for arithmetic operations, especially in processors, arithmetic logic units (ALUs), and other computing devices.
There are two primary types of subtracters:
Both can be used in various configurations to create multi-bit subtracters.
A half subtractor is the simplest subtracter circuit that performs subtraction of two single-bit binary numbers. It takes two inputs and produces two outputs: the difference and the borrow.
| A (Input) | B (Input) | Difference (D) | Borrow (B) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
A ----| |--- Difference (D)
| XOR |
B ----| |
|
|
|--- Borrow (B)
| AND |
A ----| |
B ----| |
The half subtractor uses one XOR gate and one AND gate to compute the difference and borrow.
A full subtractor is a more complex subtracter that can subtract three bits: two significant bits and a borrow bit from the previous lower significant subtraction (i.e., a borrow-in). The full subtractor also produces a difference and a borrow-out, which can be passed to the next lower bit of subtraction.
| A (Input) | B (Input) | Bin (Borrow-In) | Difference (D) | Borrow-Out (Bout) |
|---|---|---|---|---|
| 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 |
A ----| |--- XOR ---- Difference (D)
| XOR |
B ----| |
|
Bin --|
|
|--- AND |--- OR ---- Borrow-Out (Bout)
| AND |
A ----| |
B ----|
Bin ----|
A full subtractor uses two XOR gates, two AND gates, and one OR gate to compute the difference and borrow-out.
To subtract multi-bit binary numbers, we can chain multiple full subtractors together, just like we do in ripple carry adders.
A ripple borrow adder (RBA) works similarly to the ripple carry adder but for subtraction. It consists of a chain of full subtractors where each full subtractor receives the borrow-out of the previous subtractor as its borrow-in input. The first subtractor’s borrow-in is usually set to 0.
For example, to subtract two 4-bit numbers and , the RBA would consist of four full subtractors connected as:
The result is the difference , and the final borrow-out .
For subtracting the numbers:
A = 1011 (11 in decimal)
B = 1101 (13 in decimal)
Step-by-step, the full subtractors compute:
The result is the difference 1110 (which is -2 in decimal), and the final borrow-out is 1, indicating the operation resulted in a negative number.
Subtracters are used in a variety of applications in digital systems, including:
Subtracters, including the half subtractor and full subtractor, are crucial in digital arithmetic circuits for performing binary subtraction. The full subtractor, in particular, can handle the borrow-in from previous bits, making it useful for multi-bit subtraction operations. These circuits are essential components in digital systems, especially in arithmetic logic units (AL
Open this section to load past papers