Half Adder, Full Adder, and Subtractors: Design and Working
What are Adders and Subtractors? (In Simple Words)
Inside the CPU, addition is the foundation of all calculations.
- If a computer can add, it can also subtract (using 2’s complement).
- It can multiply (by repeated addition).
- It can divide (by repeated subtraction).
The electronic circuits inside the CPU’s ALU (Arithmetic Logic Unit) that perform this math are called Adders and Subtractors.
💡 Real-Life Indian Student Analogy:
When you add numbers by hand on paper (like28 + 15):
First you add8 + 5 = 13. You write down3(Sum) and carry over1(Carry).
Then in the next column, you must add2 + 1plus that carried-over 1!
A Half Adder can only add two numbers. A Full Adder can also include that carried-over number!
1. Half Adder
A Half Adder is a combinational circuit that adds two single-bit binary numbers (A and B).
- It produces two outputs: Sum (S) and Carry (C).
Truth Table:
| Input A | Input B | Sum (S) | Carry (C) | Reason |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 + 0 = 0 |
| 0 | 1 | 1 | 0 | 0 + 1 = 1 |
| 1 | 0 | 1 | 0 | 1 + 0 = 1 |
| 1 | 1 | 0 | 1 | 1 + 1 = 2 (which is 10₂ in binary) |
Boolean Expressions:
- Sum (S):
S = A'B + AB'= A ⊕ B (Built using an XOR Gate) - Carry (C):
C =A • B (Built using an AND Gate)
⚠️ Big Limitation of Half Adder: It cannot accept a carry coming from a previous column. Because of this, it can only add the very first column (LSB) of a binary number.
2. Full Adder
A Full Adder fixes the limitation of the Half Adder.
- It adds three 1-bit binary inputs: two main bits (
A,B) and a previous carry bit (Cin). - It produces two outputs: Sum (S) and Carry Out (Cout).
Truth Table:
| A | B | Cin | Sum (S) | Carry Out (Cout) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Boolean Expressions:
- Sum (S): S = A ⊕ B ⊕ Cin
- Carry Out (Cout): Cout = AB + Cin(A ⊕ B) (or
AB + BCin + ACin)
Building a Full Adder Using Two Half Adders:
This is a favorite question in DAVV exams! You can build one Full Adder using 2 Half Adders and 1 OR gate:
- Half Adder 1: Takes inputs
AandB. It givesS₁ = A ⊕ BandC₁ = AB. - Half Adder 2: Takes
S₁andCin. It produces the final Sum:S = S₁ ⊕ Cin = A ⊕ B ⊕ Cinand a second carryC₂ = S₁ • Cin. - OR Gate: Combines both carries to give final carry: Cout = C₁ + C₂.
3. Half Subtractor
A Half Subtractor subtracts one bit from another (A - B).
- Outputs: Difference (D) and Borrow (Bout).
Truth Table:
| Input A | Input B | Difference (D) | Borrow (Bout) | Explanation |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 - 0 = 0 |
| 0 | 1 | 1 | 1 | Must borrow 1 from left; (2 - 1 = 1) |
| 1 | 0 | 1 | 0 | 1 - 0 = 1 |
| 1 | 1 | 0 | 0 | 1 - 1 = 0 |
Boolean Expressions:
- Difference (D):
D = A'B + AB'= A ⊕ B - Borrow (Bout): Bout = A’ • B (Needs a NOT gate on A, followed by an AND gate)
4. Full Subtractor
A Full Subtractor subtracts three 1-bit inputs:
- First number (A), subtracted number (B), and a previous borrow (Bin).
- Outputs: Difference (D) and Borrow Out (Bout).
Truth Table:
| A | B | Bin | 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 | 1 |
Boolean Expressions:
- Difference (D): D = A ⊕ B ⊕ Bin
- Borrow Out (Bout): Bout = A’B + Bin(A ⊕ B)’ (or
A'B + A'Bin + BBin)
💡 DAVV Exam Preparation Tips
5-Mark Question: “Design a Half Adder circuit. Give its truth table, Boolean expressions, and logic diagram.”
- Draw the 4-row truth table for inputs A, B and outputs Sum, Carry.
- Write both formulas clearly:
S = A ⊕ BandC = AB.- Draw the logic circuit showing 1 XOR gate and 1 AND gate.
10-Mark Question: “Explain a Full Adder circuit with its truth table and logic expressions. Show clearly how a Full Adder can be constructed using two Half Adders and an OR gate.”
- Draw the complete 8-row truth table.
- Draw the block diagram showing:
- First Half Adder (takes A, B)
- Second Half Adder (takes S₁ and Cin)
- OR Gate (combines carries C₁ and C₂)
- Write the Boolean equations proving
S = A ⊕ B ⊕ CinandCout = C₁ + C₂.