CE2704 · Digital Logic Design
Theme 4 · Combinational building blocks

The adder: half → full

Adding binary by hand needs carries. Now we build the circuit that does it — first a cell for one column, then the cell that chains into any width.

Built from first principles.

Before you start

What you need first

  • Binary addition — column sums and carries (1+1 = 10).
  • The design method — spec → truth table → simplify → circuit.
  • XOR/AND gates — the two gates an adder is built from.

What you'll be able to do

  • Derive the half adder (two inputs) and its two gates.
  • Derive the full adder (with carry-in) and its truth table.
  • Read the FA block symbol — the cell every wide adder uses.

Adding one column: the half adder

Add two single bits A and B. The answer can be 0, 1, or 2 — and 2 needs two output bits: a Sum (this column) and a Carry (into the next). Run the design method:

ABSumCout
0000
0110
1010
1101

Read each output column straight off the table:

$$ \text{Sum} = A \oplus B \qquad C_{out} = A\cdot B $$

So the half adder is literally two gates sharing the same two inputs:

ABSum
Sum = A ⊕ B (XOR).
ABCout
Cout = A · B (AND).
Why "half"? It adds two bits but has no way to accept a carry coming in from a lower column. To add multi-bit numbers we need one more input.

Adding with a carry-in: the full adder

A real column has three bits to add: A, B, and the carry-in Cin from the column below. Three inputs, same two outputs (Sum, Cout):

ABCinSumCout
00000
00110
01010
01101
10010
10101
11001
11111

Simplifying each column gives:

$$ \text{Sum} = A \oplus B \oplus C_{in} \qquad C_{out} = A\cdot B + C_{in}\cdot(A \oplus B) $$

Notice A ⊕ B and A·B appear again — exactly a half adder's two outputs. So a full adder is just two half adders plus one OR gate: the first HA adds A and B; the second adds that sum to Cin; the OR merges the two carries.

A B S C HA s1 Cin S C HA ≥1 ABCin s1 SumCout
Inside the full adder: HA + HA + OR. The "≥1" gate is an OR (it asserts Cout if either half-adder carried).

Wrap it in one block

Once the full adder is designed and tested, we stop drawing its insides and treat it as a single labelled box — the FA block. Three inputs in, two outputs out:

A B Cin Cout S FA
The full-adder block — our building brick.
This is the cell. Every wider adder in the course — 4-bit, 8-bit, the adder/subtractor, the ALU's add path — is just copies of this FA block wired together. Design once, reuse everywhere: that's hierarchical design.

Its behaviour, in one line: it outputs the 2-bit sum of its three input bits — A + B + Cin, giving Sum (low bit) and Cout (high bit).

📐 Worked example

Full adder with A = 1, B = 1, Cin = 1

The three input bits sum to 1 + 1 + 1 = 3 = 11₂ — so we expect Sum = 1, Cout = 1. Check with the expressions:

$$ \text{Sum} = 1 \oplus 1 \oplus 1 = 1 $$
$$ C_{out} = (1\cdot 1) + 1\cdot(1\oplus 1) = 1 + 0 = 1 $$
$$ \text{Sum}=1,\quad C_{out}=1 $$
Reading the two outputs as a 2-bit number Cout Sum = 11₂ = 3 — exactly the count of 1s on the inputs. That's all an adder cell does.

✏️ Try it yourself

(a) Write the half-adder outputs Sum and Cout. (b) What extra input does a full adder have that a half adder lacks? (c) A full adder is built from how many half adders, plus what one gate? (d) Compute Sum and Cout for A=1, B=0, Cin=1.

(a) Sum = A ⊕ B,  Cout = A · B. (b) a carry-in, Cin. (c) two half adders plus one OR gate. (d) 1+0+1 = 10₂ → Sum = 0, Cout = 1.

Recap — the whole topic on one screen

BlockInputsSumCout
Half adderA, BA ⊕ BA · B
Full adderA, B, CinA ⊕ B ⊕ CinA·B + Cin·(A⊕B)
Full adder = two half adders + an OR. It's the reusable FA cell — the brick for every wider adder.

Next topic

The ripple-carry adder

One FA adds one column. Chain four of them — each carry feeding the next — and you can add 4-bit numbers. We'll build it, add an example, and find its one weakness: speed.

→ The ripple-carry adder