3.1Half adder, full adder and subtractors
The idea
A half adder adds two bits; a full adder adds two bits plus a carry-in. The sum is an XOR and the carry-out is a majority function.
Think of it like this: Adding on paper column by column: write the digit, carry the rest to the next column.
Why it exists
Almost every arithmetic circuit is a chain of full adders, and GATE asks for their gate counts and equations.
How it works
- Half adder: S = A ⊕ B, C = A·B.
- Full adder: S = A ⊕ B ⊕ Cin.
- Cout = AB + Cin(A ⊕ B), which equals the majority of A, B, Cin.
- Subtractors use the borrow instead: D = A ⊕ B, Bout = A′B for the half subtractor.
Worked example: Full adder with A = B = Cin = 1
Sum = 1 ⊕ 1 ⊕ 1 = 1 and Cout = 1·1 + 1·(1 ⊕ 1) = 1. So 1 + 1 + 1 = 11₂ = 3.
Now play with it
- →Press the Majority comparison to see that AB + C(A⊕B) matches AB + BC + AC row by row.
- →Count the gates: two half adders plus one OR make a full adder.
| Circuit | Outputs | Gates |
|---|---|---|
| Half adder | S = A⊕B, C = AB | 1 XOR + 1 AND |
| Full adder | S = A⊕B⊕Cin, Cout = AB + Cin(A⊕B) | 2 XOR + 2 AND + 1 OR (two half adders + OR) |
| Half subtractor | D = A⊕B, Bout = A'B | 1 XOR + 1 AND + 1 NOT |
| Full subtractor | D = A⊕B⊕Bin, Bout = A'B + (A⊕B)'Bin | 2 half subtractors + OR |
| m | A | B | C | F | G |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 |
| 2 | 0 | 1 | 0 | 0 | 0 |
| 3 | 0 | 1 | 1 | 1 | 1 |
| 4 | 1 | 0 | 0 | 0 | 0 |
| 5 | 1 | 0 | 1 | 1 | 1 |
| 6 | 1 | 1 | 0 | 1 | 1 |
| 7 | 1 | 1 | 1 | 1 | 1 |
The two expressions are equivalent: identical truth tables.
Check yourself
A full adder with A = 1, B = 1, Cin = 1 produces
Exam notes (the dense version)
Half adder: S = A ⊕ B, C = AB (1 XOR + 1 AND). Full adder: S = A ⊕ B ⊕ Cin, Cout = AB + Cin(A ⊕ B) = majority(A, B, Cin); built from 2 half adders + 1 OR, so 2 XOR + 2 AND + 1 OR = 5 gates. Half subtractor: D = A ⊕ B, Bout = A′B. Full subtractor: D = A ⊕ B ⊕ Bin, Bout = A′B + (A ⊕ B)′Bin. An adder/subtractor uses XOR gates on B controlled by a mode input M and sets Cin = M.
Previous year questions: Combinational Circuits (10)
PYQs are grouped by topic, so this is the full set for Combinational Circuits; try the ones that match this subtopic. Open all 10 on the topic page.