3.3.2 · D2Combinational Circuits

Visual walkthrough — Ripple-carry adder

2,450 words11 min readBack to topic

Step 1 — What "adding one column" even means

WHAT. Look at a single column of a pen-and-paper addition. Two digits sit on top of each other, and sometimes a little carry digit sneaks in from the column to the right. We add those three things.

WHY. A circuit cannot "just add" a whole number. It only ever looks at one column at a time, exactly like your hand does on paper. So the first thing to understand is the smallest possible job: add three single binary digits.

Let me name the three inputs so we never have to point:

  • — the top bit of this column (a or a ).
  • — the bottom bit of this column ( or ).
  • — the carry-in: the little (or ) handed to us from the column on our right.

PICTURE. The three arrows flowing into the box are , , . Two arrows flow out: the digit we write down, and the carry we hand leftward.


Step 2 — Why one output bit is not enough

WHAT. Add the three input bits as ordinary numbers. The smallest total is . The biggest is .

WHY. A single binary digit can only say or . But our total can reach or — those need two binary digits (, ). So one output bit is physically impossible; we are forced into two outputs.

Read the equation left to right:

The term says: "every carry-out is worth 2, because it belongs in the next column, which counts double." The is the leftover ones.

PICTURE. A number line from to . Below the answer fits in one bit (); at and the total spills over the edge and must turn on.


Step 3 — The truth table is the whole story

WHAT. List all possible input combinations and, for each, compute and using .

WHY. With only 8 rows we can just enumerate every case — no case can hide from us. This is the "cover every scenario" guarantee: after this table there are no surprises.

total
0 0 0 0 0 0
0 0 1 1 0 1
0 1 0 1 0 1
0 1 1 2 1 0
1 0 0 1 0 1
1 0 1 2 1 0
1 1 0 2 1 0
1 1 1 3 1 1

PICTURE. The 8 rows drawn as coloured tiles: cyan where the output bit is , dim where it is . Stare at the column and the column separately — each has its own visual pattern, and those two patterns are the two things we must build.


Step 4 — Reading the column: it is "oddness"

WHAT. Look only at the column. It is in exactly these rows: one input on, or all three on. Count the s in the inputs of every row: — always an odd count.

WHY. So answers one plain-English question: "is the number of s among odd?" The gate that answers exactly that question is XOR (written ). is when its two inputs differ; chain three of them and you get a whenever an odd number of inputs are .

Why XOR and not something else? Because we need the "odd-count" detector, and XOR is the odd-count detector — no other single primitive matches that column.

Each flips the running answer whenever it meets a new , so after all three the answer is "on" exactly for an odd tally.

PICTURE. A little parity machine: start at , each input toggles a switch. Odd number of toggles ⇒ lamp on ⇒ .


Step 5 — Reading the column: it is "majority"

WHAT. Now look only at . It is in every row where at least two inputs are .

WHY. Carry-out means "the total reached or more." Reaching requires two or more of the three bits to be . That is the majority function: "do the s outvote the s?"

Write majority as "any two agree on ":

Here juxtaposition () means logical AND (both ), and means logical OR (at least one term true). Each product lights up when a specific pair is both ; the OR fires if any pair does — precisely "two or more."

PICTURE. Three overlapping regions (, , ). Shade every place where at least two regions overlap — that shaded area is exactly .


Step 6 — Generate and propagate: the same carry, reshaped

WHAT. We rewrite the majority carry using the parity we already built. Define one helper signal: Then the carry becomes:

WHY. This split has physical meaning we will need in Carry-lookahead adder later:

  • generate: if both bits are , this column makes a carry on its own, no matter what arrived.
  • propagate: if exactly one bit is , the column has no carry of its own, but it will pass an incoming carry straight through. That is why is multiplied by .

This is algebraically identical to Step 5 (proof left to the verifier below), but it tells the story of the carry: "born here, or passing through."

PICTURE. Two gates feeding the carry-out: an AND making (a carry born here), and an AND of with (a carry let through), joined by an OR.


Step 7 — Chaining boxes: where the "ripple" is born

WHAT. Put of these boxes in a row, one per bit position . Wire the carry-out of box into the carry-in of box .

WHY. On paper, the carry from the ones column enters the tens column. In hardware that is literally a wire from of one box to of the next. Renaming the signals per stage:

  • — the -th bits of the two numbers.
  • — the carry arriving from below (with the overall carry-in).
  • — the final carry out of the top box.

THE KEY OBSERVATION. contains inside it. So box cannot finish until box has finished. The correct carry must travel — ripple — from bit upward, one box at a time.

PICTURE. Four boxes side by side, an amber carry-wave crossing the carry wires left→right. The top sum bit is greyed "not ready yet" until the wave arrives.


Step 8 — How long the ripple takes (the cost of simplicity)

WHAT. Let be the time for one box to compute its carry-out. The wave must cross all boxes.

WHY. Because carry physically waits for carry , the delays add, they do not overlap:

Cost in gates is also boxes area. Cheap and regular — but the linear delay is why wide adders switch to Carry-lookahead adder.

PICTURE. A bar of stacked blocks: total height grows straight-line with . Beside it, the lookahead idea shown short — a preview of why the next chapter exists.


Step 9 — The degenerate & edge cases (nothing hides)

WHAT / WHY / PICTURE, all three cases on one figure:

  1. All zeros (): every , every carry . The ripple never starts — the smallest possible input.
  2. Carry born at the bottom, dies immediately (, rest ): but with kills it; no long ripple.
  3. Worst case — carry crosses the whole width (, ): every upper stage has (bits differ), so the single carry born at bit is propagated through every box to . This is the situation.
  4. Subtraction reuse (see Two's complement): invert every and set ; the same hardware computes .
  5. Overflow (see Overflow detection): for unsigned, overflow ; for signed two's-complement, overflow — carry into the top bit differing from carry out.

The one-picture summary

Everything on one blueprint: the truth table splits into two questions (odd? / majority?), which become the XOR sum and the generate-propagate carry, which fold into one box, which chains into the rippling adder whose cost is .

Recall Feynman: the whole walkthrough in plain words

We started with one column of a paper addition: two digits and a little carry from the right — three things. Their total can be as big as three, and three needs two digits to write, so every column machine has two outputs: what we write () and what we carry (). We listed all eight cases in a tiny table. The "write" column lit up whenever an odd number of inputs were — that's the XOR gate, an oddness detector. The "carry" column lit up whenever two or more inputs were — that's the majority gate, a voting machine, definitely not XOR. We reshaped the carry into "a carry is born here if both bits are 1, or it's just passing through if the bits differ" — generate and propagate. That one box is a full adder. Line up of them and wire each carry into the next box; now the carry has to walk left, column by column, like a wave — that's the ripple. It's simple and cheap ( boxes) but slow, because the top answer can't settle until the wave has crossed every box ( little delays in a row). That waiting is the price of simplicity, and it's exactly the problem the carry-lookahead adder later fixes.

Recall

Why must a single-column adder have two output bits? ::: The total can reach or , which need two binary digits: the sum bit and the carry . Which question does answer, and which gate? ::: "Is the number of inputs odd?" — answered by XOR. Which question does answer, and which gate? ::: "Are at least two inputs ?" — answered by the majority function. What does "generate" mean physically? ::: : this column produces a carry on its own because both bits are . What does "propagate" mean physically? ::: : the column makes no carry itself but passes an incoming carry straight through. Why does the top sum bit take to settle? ::: It depends on , which depends serially on every carry below it back to — the delays add.

Connections

  • Ripple-carry adder — the parent topic this page derives in pictures.
  • Full adder — the single box built in Steps 1–6.
  • Half adder — a full adder without ; two of them plus an OR make one full adder.
  • Carry-lookahead adder — uses the generate/propagate signals of Step 6 to beat the delay.
  • Two's complement — makes the same adder subtract (Step 9, case 4).
  • Overflow detection vs (Step 9, case 5).
  • Combinational circuits — the RCA is a pure output-equals-function-of-inputs circuit.
  • Propagation delay — the timing idea behind the ripple's slowness.