Binary multiplier 2026-10-31
A digital circuit implementing binary multiplication. A combinational logic implementation forms shifted partial products with AND gates and combines them with adders. A sequential circuit can instead reuse one adder, storing a partial sum, a shifted multiplicand, and the remaining multiplier in digital registers. If those quantities are , the update , , preserves . Starting with and stopping when therefore produces , provided widths prevent overflow.
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.
A serial-in parallel-out shift register is a chain of digital registers driven by the same clock signal. At each active clock edge, the first stage captures the input and every later stage captures the preceding stage's old value. Its parallel outputs expose the successive delayed samples simultaneously.
Let be the current sample and, immediately before its sampling edge, let . Feed these signals to combinational logic implementing . Then
Only stored history stages are needed if the current input is used directly. Alternatively, a -stage shift register exposes all samples after the edge. A separate output digital register can capture the first arrangement at the edge, giving a fully sampled output. Initialize the history, or regard the first cycles as a filling interval.
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.
Shift register 2026-10-31
A chain of digital registers that transfers each stored value to the next stage at a clock edge. A serial-in parallel-out shift register exposes the stored history simultaneously. With the current input and delayed samples, combinational logic can evaluate a function of the latest samples.