3.3.12 · D2Combinational Circuits

Visual walkthrough — Combinational multipliers

2,415 words11 min readBack to topic

We use a running example the whole way: , , both written in binary as . If you can multiply with gates, you understand the machine.


Step 1 — What "multiply" means before any gates

WHAT. Before binary, before AND, let us just recall grade-school long multiplication in the number system we grew up with: base ten. We line up the numbers, multiply the top by each bottom digit, slide each result one column left, and add.

WHY. Every trick a hardware multiplier uses is already hiding in this paper method. If we name the pieces now — partial product, shift, column add, carry — the circuit later is just those pieces made of switches.

PICTURE. Look at Step Figure 1. The top number is multiplied by the ones digit (giving one row), then by the tens digit (giving a second row, shifted one place left). The two rows stack, and each column is added with carries.

Figure — Combinational multipliers

Symbol check — we have not used a single strange symbol yet. Just "row", "shift", "add".


Step 2 — Why binary makes every row trivial

WHAT. Now switch the base from ten to two. In binary every digit is either or — nothing else exists.

WHY. In base ten, "top number times a digit" could be , a real multiplication. In base two, "top number times a digit" is only ever:

  • times copy the top number, or
  • times write all zeros.

That is the whole reason binary multiplication is cheap: no multiplication table is needed, only copy-or-zero.

PICTURE. Step Figure 2 shows our example (that is ) multiplied by each bit of . Because both bits of are , both partial products are just a copy of : the first row is , the second row is shifted one column left.

Figure — Combinational multipliers

Step 3 — One partial-product bit is exactly one AND gate

WHAT. Zoom into a single cell of a row. That cell is "one bit of the top number, times one bit of the bottom number": the product of two single bits.

WHY this tool — the AND gate, not XOR, not OR. Ask: when is the single-bit product equal to ? Only when both are , because and every other combination gives . Write that truth table out and it matches one gate exactly — the AND gate, whose output is only when both inputs are . So the arithmetic is the logic . (XOR would be wrong — it fires on too — and XOR belongs later, when we add.)

PICTURE. Step Figure 3 puts the multiplication truth table next to the AND-gate truth table so you can see they are the same four rows.

Figure — Combinational multipliers

See AND Gate for the gate itself.


Step 4 — Placing each AND result in its column (the weight )

WHAT. Every AND result must go into a column. Which one? Bit carries weight , bit carries weight . When you multiply them, the weights multiply: . So the product lands in the column of weight .

WHY. This is the single line that turns "long multiplication on paper" into an exact wiring diagram: the exponent is the column number, and column number how many places you shifted. No shifting is done "by hand" — the geometry of the grid does it.

PICTURE. Step Figure 4 is the placement grid for the multiplier. Each of the four AND outputs is dropped into its column . Notice two bits land in column — that is where addition will be forced.

Figure — Combinational multipliers

Positional weights come from the Binary Number System.


Step 5 — Adding a column: the half adder appears

WHAT. Column holds two bits: and . We must add them. Adding two single bits can produce — a result that needs two output bits: a sum bit that stays here, and a carry bit that moves one column left.

WHY this tool — a half adder. Two inputs, no incoming carry from a lower column: that is precisely a half adder. Its two outputs are built from two gates you already know:

  • sum (the XOR gate — output when the inputs differ, i.e. exactly one is : that is " or ", and " with a carry"),
  • carry (AND — a carry happens only when both were ).

Now XOR is earned. Notice XOR shows up only here, inside adding — never in forming products. That is the whole "multiply = AND, add = XOR" distinction the parent warned about.

PICTURE. Step Figure 5 shows the two bits of column entering a half adder, the XOR producing the sum bit that stays, and the AND producing the carry that shoots left into column .

Figure — Combinational multipliers

See Half Adder and Full Adder for the summing cells.


Step 6 — Full adder where a carry arrives (deeper columns)

WHAT. Column is different. It holds the product bit and the carry that arrived from column . That is three things to add potentially (in bigger multipliers, up to three), and there is an incoming carry.

WHY this tool — a full adder. A half adder only takes two inputs; it has no slot for an incoming carry. The moment a column receives a carry from below, you need a full adder: three inputs (the two bits plus carry-in), two outputs (sum + carry-out). That is why the parent says "half adders where no carry enters, full adders elsewhere."

PICTURE. Step Figure 6 shows column : the AND product and the incoming carry feeding a full adder, producing (stays) and (moves to column ).

Figure — Combinational multipliers

Step 7 — Watch compute, column by column

WHAT. Put numbers in. With , every AND . Now walk the columns right to left.

WHY. This is the moment the abstract grid becomes an actual number. Every carry you see is a real "1+1 overflowed" moment, exactly like decimal.

  • Column : only . Nothing to add .
  • Column : . Half adder: , carry .
  • Column : . Full adder: , carry .
  • Column : only .

Reading top bit to bottom bit: . And indeed . ✓

PICTURE. Step Figure 7 animates the carry cascade: two carries march left, each column collapses to one output bit, and the amber answer appears along the bottom.

Figure — Combinational multipliers

Step 8 — The edge cases you must never trip on

WHAT. A derivation is only trustworthy if it survives the weird inputs. Three of them:

  1. Multiply by zero. Let , so . Then every AND : all partial products vanish, and . Why it works: AND with is always — the "write all zeros" case from Step 2 handled automatically, no special circuitry.
  2. The smallest carry-free case. , : only , no column ever has two bits, so no adder ever fires. The product is a single wire. This proves the adders are only there for column collisions.
  3. The width bound / largest product. For -bit numbers the biggest inputs are all-ones. In our world that is 4 bits . It never overflows into a 5th column because . In general the product , so exactly output bits suffice — never fewer.

WHY these matter. Zero tests the degenerate input; tests the no-adder minimum; all-ones tests the maximum width. Between them they show the machine can never surprise you.

PICTURE. Step Figure 8 lines up all three edge cases side by side: an all-dark grid (), a single-lit cell (), and the full grid pushing right up to bit but never past it ().

Figure — Combinational multipliers

The one-picture summary

The whole array multiplier is: AND makes the bits, columns place them, adders stack them, carries pace them.

Figure — Combinational multipliers
Recall Feynman retelling of the whole walkthrough

Imagine multiplying on paper. You write the top number once for each in the bottom number, sliding each copy one step left, then add the stacked copies. Binary makes each copy trivial: a bottom bit of says "copy", a says "all zeros" — and that copy-or-zero decision for a single bit is one little AND switch. Now every copied bit sits in some column; the column number is just how far you slid, which is why the maths writes it as . When a column has two bits stacked, you add them: makes here and a carried one column left — a half adder does exactly that (XOR for the digit that stays, AND for the carry). If a column also catches an incoming carry, you need a full adder, which has room for that extra input. Feed in: every switch turns on, two carries march leftward, and the columns collapse to , which is . Turn a bottom number to zero and every switch goes dark — the answer is zero for free. Make both numbers just and no adder fires at all — a single wire is the product. And the widest the answer can ever get is bits, because even all-ones times all-ones stays just under .


Connections