
Computers are amazing at math, but deep down, they only know two things: 1 and 0. While adding binary numbers is common knowledge, subtraction is just as critical for a computer's Arithmetic Logic Unit (ALU).
The simplest circuit that performs subtraction is the Half Subtractor.
Whether you are a computer science student or an electronics hobbyist, understanding this circuit is the first step toward understanding how processors process data. This guide explains the logic, the math, and the circuit design of the Half Subtractor.
Table of Contents
- 1. What is a Half Subtractor?
- 2. The Truth Table: Binary Subtraction Rules
- 3. Boolean Expressions (The Math)
- 4. The Circuit Diagram
- 5. Why is it called "Half"? (Limitations)
- 6. Conclusion
1. What is a Half Subtractor?
A Half Subtractor is a combinational logic circuit designed to subtract one single bit from another.
- Inputs: It has 2 inputs, typically labeled A (Minuend) and B (Subtrahend).
- Outputs: It has 2 outputs, labeled Difference (D) and Borrow (Bout).
Think of it as the most basic calculation: $A - B$.
2. The Truth Table: Binary Subtraction Rules
To understand the outputs, we must look at the four possible combinations of 2-bit subtraction.
| Input A (Minuend) | Input B (Subtrahend) | Difference (D) | Borrow (Bout) | Comment |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | $0 - 0 = 0$ |
| 0 | 1 | 1 | 1 | $0 - 1$ needs a borrow! |
| 1 | 0 | 1 | 0 | $1 - 0 = 1$ |
| 1 | 1 | 0 | 0 | $1 - 1 = 0$ |
The Tricky Part ($0 - 1$): In decimal, if you try to subtract 9 from 5 ($5 - 9$), you borrow from the tens column. In binary, $0 - 1$ is impossible without borrowing. So, the Half Subtractor generates a Borrow Output of 1, essentially saying "I need to borrow 2 from the next column." This makes the math $2 - 1 = 1$.
- Result: Difference = 1, Borrow = 1.
3. Boolean Expressions (The Math)
Now, let's turn that Truth Table into boolean algebra so we can build the circuit.
For the Difference ($D$)
Look at the Difference column. It is High (1) only when A is different from B (0-1 or 1-0). This is the classic definition of the XOR (Exclusive-OR) operation.
$$D = A \oplus B$$
For the Borrow ($B_{out}$)
Look at the Borrow column. It is High (1) only in one specific case: When A is 0 AND B is 1. In logic terms, this is NOT A AND B.
$$B_{out} = \bar{A} \cdot B$$
4. The Circuit Diagram
Based on the math above, we can build a Half Subtractor using just three Logic Gates:
- XOR Gate: Inputs A and B connected. Output is Difference.
- NOT Gate (Inverter): Connected to Input A.
- AND Gate: Inputs are (NOT A) and B. Output is Borrow.
5. Why is it called "Half"? (Limitations)
You might wonder, if this subtracts numbers, why is it only a "Half" subtractor?
The Limitation: The Half Subtractor only accepts two inputs ($A$ and $B$). However, when you subtract large multi-bit numbers (like $110 - 011$), the second column might have received a Borrow Request from the first column.
- Half Subtractor: Can calculate $A - B$.
- Full Subtractor: Can calculate $A - B - B_{in}$ (Borrow In).
Because the Half Subtractor has no pin to accept a "Borrow In" from a previous operation, it is incomplete. It is usually only used for the Least Significant Bit (LSB) of a calculation, while Full Subtractors handle the rest.
6. Conclusion
The Half Subtractor is a fundamental building block of digital electronics. By combining an XOR gate for the difference and an AND gate with an inverted input for the borrow, it perfectly mimics the rules of binary arithmetic. While limited by its inability to accept incoming borrows, it paves the way for the more complex Full Subtractor.
Building Logic Circuits? Need to test this theory on a breadboard? You need standard Logic ICs. Visit Aichiplink.com to search for the 74HC86 (XOR), 74HC04 (NOT), and 74HC08 (AND) chips.

Written by Jack Elliott from AIChipLink.
AIChipLink, one of the fastest-growing global independent electronic components distributors in the world, offers millions of products from thousands of manufacturers, and many of our in-stock parts is available to ship same day.
We mainly source and distribute integrated circuit (IC) products of brands such as Broadcom, Microchip, Texas Instruments, Infineon, NXP, Analog Devices, Qualcomm, Intel, etc., which are widely used in communication & network, telecom, industrial control, new energy and automotive electronics.
Empowered by AI, Linked to the Future. Get started on AIChipLink.com and submit your RFQ online today!
Frequently Asked Questions
Q1: What is a Half Subtractor used for?
It is used to subtract two single-bit binary numbers and generate a Difference and a Borrow.
Q2: What are the inputs and outputs of a Half Subtractor?
Inputs: A (Minuend) and B (Subtrahend). Outputs: Difference (D) and Borrow (Bout).
Q3: Why does a Half Subtractor use an XOR gate?
Because the Difference output follows XOR logic, producing 1 when the inputs are different.
Q4: What is the main limitation of a Half Subtractor?
It cannot accept a Borrow-in, so it cannot be used alone for multi-bit subtraction.
Q5: What is the difference between a Half Subtractor and a Full Subtractor?
A Full Subtractor includes an additional Borrow-in input, while a Half Subtractor does not.