Shift and add

You will learn

Why a multiplier is a pile of shifted partial products, and how many of them a number costs.

Every 1 bit of the multiplier adds a copy of the multiplicand shifted by that bit's position; every 0 bit adds nothing. 200 x 13 is 200 + 800 + 1600 = 2600, three rows out of eight. Two 8-bit numbers make at most a 16-bit product, and an array multiplier is exactly this grid of AND gates feeding the carry-save trees of the last lesson. The spec multipliers.t27 computes each row and the running sum the widget draws.

Open the interactive lesson →