Binary multiplication 2026-10-31
For nonnegative integers with binary representation , multiply by by summing the shifted terms . Each term is either zero or a left bit shift of . An unsigned -bit input pair needs at most product bits, because . This expansion follows from distributivity and motivates a binary multiplier.
Digital register 2026-10-31
A fixed-width collection of flip-flops storing a binary representation. A synchronous load-enabled digital register captures all its input bits on the active clock edge when load is asserted and otherwise retains its old value. One multiplexer before each D flip-flop can select new data or feedback from its old output. A processor register is a particular use inside a processor; temporary state in a standalone binary multiplier is another.
Split the four-bit unsigned inputs into two-bit halves: and . Use four copies of the two-bit binary multiplier to compute , , , and . Then
The extreme terms occupy disjoint output positions: uses positions zero to three and uses positions four to seven. Form by concatenating their four-bit outputs, with in the upper half and in the lower half. This needs wiring alone, so without an adder.
Use the first eight-bit adder to form after zero-extension, and the second to form . Thus four two-bit binary multipliers and two eight-bit adders suffice. The fixed left bit shift is also wiring alone.
The middle sum can reach , so preserve all five of its potentially nonzero bits; retaining only four would be wrong. Its shifted value is at most 72. The final result is at most , so both additions fit in eight bits. Concatenating the disjoint extreme terms is what saves an addition.
Use unsigned inputs as in the preceding parts. Store a 16-bit accumulator , a 16-bit shifted multiplicand , an eight-bit multiplier , and a three-bit iteration binary counter . The sequential circuit has one 16-bit adder, a 16-bit multiplexer selecting or zero from , fixed one-place bit shifts, and load/hold selection for the digital registers. The input values are captured when start is accepted, so later input changes cannot alter the operation.
Figure 1.
The shift-and-add binary multiplier reuses one 16-bit adder for eight iterations
. Details.
Use three control states with the following synchronous transition table. All assignments in a row use the old digital register values and occur together at the active clock edge.
StateConditionRegister updatesNext stateIDLEstart = 0Hold all digital registersIDLEIDLEstart = 1, , , RUNRUN, , , RUNRUN, , ; hold DONEDONEstart = 1Hold all digital registersDONEDONEstart = 0Hold all digital registersIDLE
Reset selects IDLE and clears the digital registers. Set and done = 1 exactly in DONE. A start pulse in IDLE launches one multiplication; further pulses during RUN are ignored. Holding start high cannot repeatedly launch operations: DONE waits for it to go low before rearming. The product remains stored while waiting and through the following IDLE state. There are eight RUN clock edges after the loading edge; the last addition is captured before done becomes high.
For correctness, let denote the captured values. After iterations, for , the loop invariant is
so . Writing , the next accumulation adds , the left bit shift doubles , and the logical right shift changes to . Hence the invariant is preserved. At , , giving . The largest product is , so the accumulator fits. Even the final shifted multiplicand is , so it also fits.