Apex › Hardware

How hardware multiplies fast (Wallace tree)

Multiplying is a sum of partial products — a shifted copy of a for each 1-bit of b — and adding N of them in sequence is slow. A Wallace tree lays every partial-product bit out as a dot diagram (a column per bit-weight) and reduces it with carry-save adders: a full adder turns 3 dots in a column into 1 sum dot + 1 carry dot next door, with no carry propagation, so every column compresses in parallel. After O(log N) stages only two rows remain, added once. Verified in node: the reduced product equals a·b (2000 multiplies, 0 mismatch) and the weighted dot-sum is invariant every stage. Step the reduction and watch the triangle collapse.

More in Hardware