DE-05: Combinational Circuits — Adders & Subtractors — VLSI Trainers
Digital Electronics Series · DE-05

Combinational Switching Circuits

Combinational design methodology — Half Adder, Full Adder, Parallel Binary Adder, Half & Full Subtractor, BCD (8421) Adder, Excess-3 Adder, and the 2’s Complement Adder/Subtractor — with truth tables, Boolean expressions, K-map derivations, and IC references.

📐 Combinational Design Methodology

A combinational circuit is a network of logic gates where the outputs depend only on the current inputs — there is no memory, no feedback. The design follows a fixed five-step process:

1. Word Statement 2. Assign Variables 3. Truth Table 4. K-Map Simplify 5. Draw Logic Circuit
Figure 1 — The five-step combinational circuit design process. Each step is mandatory; skipping K-map minimization leads to unnecessarily complex gate networks.

Combinational circuits do not have memory elements — the same inputs always produce the same outputs. This is in contrast to sequential circuits (covered in DE-08 through DE-10) which include flip-flops and whose outputs depend on both current inputs and past history.

Half Adder

A half adder adds two single binary digits A and B simultaneously, producing a Sum and a Carry output. It is called “half” because it cannot accept a carry-in from a previous column — that limitation is resolved by the full adder.

Truth Table
ABSum (S)Carry (C)
0000
0110
1010
1101
Boolean Expressions

S = A·B̄ + Ā·B = A ⊕ B

C = A · B

Sum = XOR of inputs
Carry = AND of inputs
Half Adder Implementations Method 1: XOR gate + AND gate (simplest) A B Sum (S) AND Carry (C) Method 2: 5 NAND gates only NAND₁ NAND₂ NAND₃ NAND₄ NAND₅ Sum (S) Carry = NAND₁ NAND₁(A,B) gives Carry directly. NAND₂–₅ reconstruct Sum from NAND₁ output and inputs.
Figure 2 — Half adder implementations. Method 1 (XOR+AND) uses 2 gates. Method 2 uses 5 NAND gates — useful when only NAND gates are available in a design (universal gate implementation). A further optimisation reduces this to 5 NAND gates from the initial 7-gate derivation.
Key identity: S = A ⊕ B (XOR). The XOR gate is the natural building block for all adder circuits — every adder and subtractor at the bit level relies on XOR for the sum/difference output.

Full Adder

A full adder adds three bits — augend A₁, addend B₁, and carry-in C₀ from the previous column — producing a Sum S₁ and carry-out C₁. It is the fundamental building block of all multi-bit binary adders.

A₁B₁C₀ (carry-in)Sum S₁Carry-out C₁
00000
00110
01010
01101
10010
10101
11001
11111

Boolean Expressions (derived from K-map)

K-map derivation — Sum S₁ and Carry C₁
S₁From K-map: no adjacent pairs simplify — S₁ = A₁⊕B₁⊕C₀   (XOR of all three inputs)
Expand S₁Let S = A₁⊕B₁ (half adder sum). Then S₁ = S⊕C₀ = S·C̄₀ + S̄·C₀
C₁From K-map: C₁ = A₁·B₁ + B₁·C₀ + A₁·C₀
Factorise C₁= A₁·B₁ + (A₁⊕B₁)·C₀ = C + S·C₀   where C = A₁·B₁ (half adder carry)
S₁ = A₁ ⊕ B₁ ⊕ C₀     C₁ = A₁·B₁ + (A₁⊕B₁)·C₀
Full Adder = Two Half Adders + One OR Gate Half Adder 1 A₁ B₁ S (=A₁⊕B₁) C (=A₁·B₁) Half Adder 2 C₀ S₁=S⊕C₀ Sum (S₁) C′=S·C₀ OR Carry-out (C₁) C₁ = C + C′ = A₁·B₁ + (A₁⊕B₁)·C₀ · Full Adder uses 9 NAND gates for all-NAND implementation
Figure 3 — Full adder built from two half adders and one OR gate. HA1 adds A₁ and B₁ to get intermediate sum S and carry C. HA2 adds S and carry-in C₀ to get final sum S₁ and intermediate carry C′. The OR gate combines both carries: C₁ = C + C′.
Full Adder = 2 Half Adders + 1 OR gate. This structure is important — it shows that a full adder is built hierarchically from simpler units. In practice, ICs implement the full adder directly in optimised gate-level logic (9 NAND gates), not as two separate HA ICs.

🔗 Parallel Binary Adder & ICs

To add two n-bit binary numbers, n full adders are chained so that the carry-out of each stage feeds the carry-in of the next. This is called a ripple-carry adder — the carry “ripples” through from LSB to MSB. The main disadvantage is propagation delay: with n stages, the total delay is n × single-FA delay.

4-bit Ripple-Carry Adder — Four Full Adders in Series FA₀ (LSB) A₀ B₀ C₁→ FA₁ A₁ B₁ C₂→ FA₂ A₂ B₂ C₃→ FA₃ A₃ B₃ (MSB) C₄ S₀ S₁ S₂ S₃ C₀=0 Parallel Adder ICs IC 74LS82 — 2-bit full adder (two 7482 → 4-bit) IC 74C83 — 4-bit parallel binary adder (look-ahead carry) Two 74C83 → 8-bit adder (connect C₄ of first to C₀ of second)
Figure 4 — 4-bit ripple-carry adder. Carry-in C₀ = 0 for the LSB stage. Each carry-out feeds directly into the next stage’s carry-in. The output is the 4-bit sum S₃S₂S₁S₀ plus a potential carry-out C₄ (overflow bit).

Available ICs: 74LS82 2-bit full adder  |  74C83 4-bit parallel adder with carry look-ahead. Chain two 74C83s for 8-bit addition.

Half Subtractor

A half subtractor subtracts one binary digit Y₀ (subtrahend) from another X₀ (minuend), producing a Difference D₀ and a Borrow B₀. Like the half adder, it cannot accept a borrow-in from a previous stage.

Truth Table
X₀Y₀Diff D₀Borrow B₀
0000
0111
1010
1100
Boolean Expressions

D₀ = X₀·Ȳ₀ + X̄₀·Y₀ = X₀ ⊕ Y₀

B₀ = X̄₀ · Y₀

Difference = XOR (same as sum!)
Borrow = NOT(X₀) AND Y₀
Half adder vs half subtractor. The Difference expression D₀ = X₀⊕Y₀ is identical to the Sum expression S = A⊕B. The only difference is the Borrow: B₀ = X̄₀·Y₀, while the Carry is C = A·B. To convert a half adder to a half subtractor, add one NOT gate on the A/X input feeding the AND gate.

Full Subtractor

A full subtractor subtracts subtrahend Y₁ and borrow-in B₀ from minuend X₁, producing Difference D₁ and borrow-out B₁. Three inputs, two outputs.

X₁Y₁B₀ (borrow-in)Diff D₁Borrow B₁
00000
00111
01011
01101
10010
10100
11000
11111
Derivation — D₁ and B₁ expressions
D₁From truth table — 1s at rows 1,2,4,7 → D₁ = X₁⊕Y₁⊕B₀ (same XOR pattern as full adder sum)
B₁ K-mapFrom K-map (1s at rows 1,2,3,7): B₁ = X̄₁·Y₁ + Y₁·B₀ + X̄₁·B₀
Simplify B₁= X̄₁·Y₁ + (X₁⊕Y₁)·B₀ = X̄₁·Y₁ + D₀·B₀   where D₀ = X₁⊕Y₁
D₁ = X₁ ⊕ Y₁ ⊕ B₀     B₁ = X̄₁·Y₁ + (X₁⊕Y₁)·B₀

Just as the full adder is two half adders + OR gate, the full subtractor = two half subtractors + OR gate. The structural pattern is identical; only the borrow generation differs from carry generation.

🔟 BCD (8421) Adder

A BCD adder adds two decimal digits in BCD format. Because BCD only uses codes 0000–1001 (0–9), the sum from a normal binary adder may land in the illegal range 1010–1111 (10–15). When this happens, add 0110 (6 decimal) to skip over the six illegal codes and produce the correct BCD result with a carry.

BCD Adder — When to Add 0110 Correction Case 1 — Sum ≤ 9 (valid BCD) 3 = 0011 and 4 = 0100 Binary sum = 0111 = 7 ✓ 0111 is valid BCD for 7 No correction needed. Add 0000. Case 2 — Sum > 9 (illegal code) 7 = 0111 and 6 = 0110 Binary sum = 1101 (=13) ✗ 1101 is illegal in BCD Add 0110: 1101+0110 = 1_0011 → BCD 0001 0011 (13) ✓ Correction Detect Logic X = S₄ + S₃·S₂ + S₃·S₁ where S₄S₃S₂S₁S₀ = binary sum If X = 1: add 0110 to sum If X = 0: add 0000 (no change) X=1 when: S₄=1 (carry out) or sum ≥ 1010 (illegal codes)
Figure 5 — BCD addition correction logic. The correction term X detects when the binary sum exceeds 9. X is computed from the sum bits and drives a second 4-bit adder that adds 0110 when required. ICs: two 74LS83 (4-bit parallel adders) + correction gates implement a full one-digit BCD adder.
Example — Add 476 + 394 in BCD
BCD(476)0100 0111 0110
BCD(394)0011 1001 0100
Binary sum1000 0000 1010 ← raw binary addition
Check LSD1010 = 10 > 9 → add 0110 → 1010+0110 = 1_0000, carry=1
Check 2nd0000 + carry 1 = 0001 ≤ 9 → no correction
Check MSD1000 = 8 ≤ 9 → no correction
476 + 394 = 870   BCD: 1000 0111 0000
Carry detect formula: X = S₄ + S₃·S₂ + S₃·S₁ — this Boolean expression is true for all invalid sums (10–15) and for sums that generate a carry (≥16). It drives the second adder stage that adds the 0110 correction automatically in hardware.

3️⃣ Excess-3 (XS-3) Adder

The Excess-3 adder exploits the self-complementing property of XS-3 code. Recall from DE-02 that in XS-3 each digit is BCD + 3. After binary addition of two XS-3 digits:

Example — Add 45 + 38 in Excess-3
XS-3(4)0111
XS-3(5)1000
XS-3(3)0110
XS-3(8)1011
LSD: 5+81000 + 1011 = 1_0011 → S₄=1 (carry) → add 0011 → 0011+0011 = 0110 (XS-3 for 3) ✓
MSD: 4+3+10111 + 0110 + 1 = 1110 → S₄=0 (no carry) → subtract 0011 → 1110−0011 = 1011 (XS-3 for 8) ✓
45 + 38 = 83   XS-3: 1011 0110
Unified correction. In hardware, both cases can be handled by a single rule: add S₄·S̄₄·S̄₄·S̄₄ in each position — effectively, when S₄=1 add 0011, and when S₄=0 add 1100 (plus the end-around carry). The circuit uses one adder stage with controlled inputs driven by the carry bit S₄.

± 2’s Complement Adder/Subtractor

The most elegant design: a single circuit that performs both addition and subtraction using a SUB control signal and XOR gates. This is the circuit used inside every ALU.

4-bit 2’s Complement Adder/Subtractor — SUB Signal Controls Operation SUB XOR B₀ XOR B₁ FA₀ FA₁ FA₂ FA₃ A₀ A₁ A₂ A₃ C₀=SUB C₄ S₀ S₁ S₂ S₃ How it works SUB = 0 (Add): B⊕0 = B (unchanged) C₀ = 0 → normal addition SUB = 1 (Subtract): B⊕1 = B̄ + C₀=1 → 2’s comp!
Figure 6 — 2’s complement adder/subtractor. When SUB=0, XOR gates pass B bits unchanged and C₀=0 — normal addition. When SUB=1, XOR gates invert B bits (1’s complement) and C₀=1 (via the carry-in connection) adds 1 — giving the 2’s complement of B. Result: A−B = A+(2’s complement of B).
SUB signalXOR behaviourCarry-in C₀Result
0 (Add)B ⊕ 0 = B (pass through)0A + B
1 (Subtract)B ⊕ 1 = B̄ (invert = 1’s complement)1 (via SUB)A + B̄ + 1 = A + (2’s comp of B) = A − B
Overflow detection. The final carry C₄ serves as the overflow bit for the adder and as the sign bit indicator for the subtractor. If the result of a signed operation overflows the available bit width, C₄ ≠ carry into the MSB — hardware detectors check this condition to flag arithmetic overflow.

📋 Quick Reference

CircuitInputsKey ExpressionsIC / Notes
Half AdderA, BS = A⊕B   C = A·BXOR + AND = 2 gates; or 5 NAND gates
Full AdderA, B, CᵢₙS = A⊕B⊕Cᵢₙ   Cₒᵤₜ = A·B + (A⊕B)·Cᵢₙ2 HA + OR; or 9 NAND; IC 74LS82
Parallel Addern-bit A, Bn FAs in series; carry ripples LSB→MSBIC 74C83 (4-bit); chain for 8-bit
Half SubtractorX, YD = X⊕Y   B = X̄·YSame as HA + one NOT on X input
Full SubtractorX, Y, BᵢₙD = X⊕Y⊕Bᵢₙ   Bₒᵤₜ = X̄·Y + (X⊕Y)·Bᵢₙ2 Half Subtractors + OR gate
BCD Adder4-bit BCD × 2Add 0110 if sum > 9 or carry out; X = S₄ + S₃·S₂ + S₃·S₁Two 74LS83 + correction gates
XS-3 Adder4-bit XS-3 × 2Carry=1: add 0011; Carry=0: subtract 0011 (add 1100+EAC)One adder + controlled correction
2’s Comp Add/SubA, B, SUBSUB=0: A+B; SUB=1: A+(B̄+1) = A−B; B⊕SUB + C₀=SUB4 XOR gates + 4 FA; universal ALU core
Coming next — DE-06: More Combinational Circuits — Multiplexers (MUX), Demultiplexers, Decoders (3-to-8, BCD-to-7-segment), Encoders, Priority Encoders, Magnitude Comparators, Parity Generator/Checker, and Programmable Logic Devices (FPLA, PAL, PROM).
Scroll to Top