3.3.3 · D3Combinational Circuits

Worked examples — Carry-lookahead adder

3,162 words14 min readBack to topic

Before we count cases, one reminder of the machinery from the parent — written out so nothing is assumed:


The scenario matrix

Every CLA problem falls into one of these cells. The examples below are labelled with the cell(s) they cover.

Cell What makes it special Where it can bite
C1 Plain add, some generates, some propagates baseline sanity
C2 Long propagate chain one generate rides across many carry "travels"
C3 All generate every max carries, overflow-out
C4 All zero / degenerate no carry ever forms
C5 Carry-in the term matters forgetting
C6 Carry born, then dies generate below a gap chain broken
C7 Real-world word problem decimal → binary → CLA translation
C8 Exam twist: OR-vs-XOR trap wrong definition sum breaks

We hit all eight below.


Example 1 — Cell C1 (plain add, )

Notice how the generate at bit 0 was propagated through bits 1 and 2 (both ) and then stopped at bit 3 (where ). That's cell C1's flavour — a carry that lives and dies inside the word.


Example 2 — Cell C2 (long propagate chain)


Example 3 — Cell C3 (all generate) + Cell C5 seed


Example 4 — Cell C4 (all zero / degenerate)


Example 5 — Cell C5 (carry-in )


Example 6 — Cell C6 (carry born, then dies at a gap)


Example 7 — Cell C7 (real-world word problem)


Example 8 — Cell C8 (exam twist: the OR-vs-XOR trap)


Recall Which cell does each example cover? (quick self-test)

Long-propagate-chain example number? ::: Example 2 (Cell C2). Which example forces you to keep the term? ::: Example 5 (Cell C5). Which example shows a carry dying at a wall? ::: Example 6 (Cell C6). Which example proves OR-propagate breaks only the sum, not the carry? ::: Example 8 (Cell C8). What is special about the all-1s input (Example 3)? ::: Every , every — maximum carries, no propagation.

Connections

  • Carry-lookahead adder — parent; this page stress-tests its formulas.
  • Full Adder — each column here is one full adder's logic.
  • Ripple-Carry Adder — the "carry rides slowly" baseline our Example 2 beats.
  • Boolean Algebra — Example 8's OR-vs-XOR argument is pure Boolean identity.
  • Propagation Delay & Fan-in — why all-generate (Example 3) still costs constant depth.
  • Prefix Adders (Kogge-Stone) — generalizes the "born/ride/die" carry chains logarithmically.