Shift-and-Add and Booth’s Multiplication Algorithms (with Worked Examples)
In binary multiplication, a key primitive is to combine shift operations with conditional add/subtract operations based on bits of the multiplier. Two classic algorithms are:
- Shift-and-add multiplication: iterate over multiplier bits; if a bit is 1, add the appropriately shifted multiplicand.
- Booth’s multiplication algorithm: recodes the multiplier using overlapping bit-pairs and uses arithmetic shifts.
Both algorithms can be implemented with registers and control logic; Booth’s method typically reduces the number of additions for multipliers with long runs of 0s or 1s in two’s-complement representation.
However, I’m currently unable to perform the required web research (the web-search tool is failing due to a usage-limit error), so I cannot provide the mandatory web-backed citations and references for the technical claims and step details.
Core idea of shift-and-add
For unsigned multiplication, to compute where is the multiplier, scan from least significant bit (LSB) to most significant bit (MSB):
- Maintain an accumulator initially 0.
- For each bit of :
- If , add shifted left by into .
- Shift the multiplier processing forward (conceptually shifts; alternatively keep fixed and shift an “addend register”).
This matches the schoolbook “partial products” method, but structured as a loop with conditional addition.
Key terms:
- Partial product
- Least significant bit (LSB)
- Accumulator
Conceptual diagram
Shift-and-Add Multiplication (unsigned example)
- 1Step 1
Let and . Use 4 multiplier bits (i=0..3).
- 2Step 2
Set .
- 3Step 3
Multiplier bit , so add to ⇒ .
- 4Step 4
Multiplier bit , so add ⇒ .
- 5Step 5
Multiplier bit , so add nothing; stays .
- 6Step 6
Multiplier bit , so add ⇒ .
- 7Step 7
Binary result equals , and .
Signed multiplication and two’s complement context
Booth’s algorithm is designed to work naturally with two’s-complement signed integers by using arithmetic shifts and allowing subtraction when certain bit patterns appear.
Key terms:
- Two’s-complement
- Arithmetic shift right
- Signed partial products
Booth’s multiplication algorithm (recoding view)
Booth’s algorithm examines overlapping pairs of bits from the multiplier , typically and an appended (or an extra register bit). For each step:
- If the pair is : add to the accumulator.
- If the pair is : subtract from the accumulator.
- If the pair is or : do nothing. Then perform an arithmetic right shift of the combined registers (accumulator and multiplier register).
This reduces the number of additions/subtractions by replacing sequences of 1s in the multiplier with a single subtract followed by fewer adds (or vice versa), effectively computing using run-length encoding properties.
Key terms:
- Booth recoding
- Run of 1s
Booth’s Multiplication (example with bit-pair decisions)
- 1Step 1
Let (positive) and . In 4-bit two’s complement, . We’ll use a combined width sufficient for intermediate arithmetic shifts (conceptually 5 bits for sign/overflow during steps).
- 2Step 2
Set .
- 3Step 3
We inspect pairs from LSB upward.
- 4Step 4
Here (LSB of ) is 1, so pair is (1,0) = 10 ⇒ subtract .
- 5Step 5
After the subtract decision, perform an arithmetic right shift of the concatenated registers (accumulator+multiplier), preserving the sign bit.
- 6Step 6
Continue for pairs 01/10/00/11; each pair decides add/sub/no-op, then shift.
- 7Step 7
"After processing all multiplier bits, the combined register holds the two’s-complement product."
Note: Providing a fully correct register-level trace (every intermediate A/Q state in binary) requires precise bit-width conventions and a verified worked trace. Because web research is currently unavailable, I’m not able to guarantee the exact step-by-step register evolution in the format expected for a “research-backed” course section.
Decision table (Booth’s bit-pair rule)
Booth’s add/sub/no-op action depends on the 2-bit pattern :
| Pair | Action |
|---|---|
| 00 | No operation |
| 01 | Add |
| 10 | Subtract |
| 11 | No operation |
Key terms:
- No-op
- Add/subtract condition
Pro Tip: Think “bit-pairs + arithmetic shift”
Booth is easier to remember if you separate it into (1) a bit-pair decision rule (00/01/10/11) and (2) a mandatory arithmetic right shift after each decision.
Common pitfall: using logical shift instead of arithmetic shift
For signed two’s-complement multiplication, Booth relies on arithmetic right shifts to preserve the sign bit; a logical shift can corrupt negative intermediate states.
Qualitative operation count: shift-and-add vs Booth
Illustrative trend: Booth often reduces the number of adds/subtracts when multiplier contains long runs of 1s or 0s (exact counts depend on bit pattern).
Multiplication computation flow (both algorithms)
Set registers
InitializeSet accumulator to 0; set multiplier and multiplicand registers."
Conditional arithmetic
IterateShift-and-add: add if multiplier bit is 1. Booth: add/sub based on bit-pairs."
Move to next bit
ShiftShift the combined registers (Booth uses arithmetic right shift for signed)."
Read product
FinishAfter n steps, combined registers contain the product."
Common edge cases and correctness checks
Knowledge Check
In shift-and-add multiplication, what happens at step i when the current multiplier bit q_i is 0?