💡 What is Multiplication in Computers?
When you multiply numbers on paper, you probably remember doing it like this:
101 (5)
x 011 (3)
-------
101 ← (5 × 1)
+ 1010 ← (5 × 1, shifted one position left)
-------
1111 (15)
A computer does something very similar — except it uses binary digits (0s and 1s) and performs the process using shifting and adding operations.
This method is called the Shift-and-Add Multiplication Algorithm.
⚙️ The Main Idea
The basic concept is:
Multiply each bit of the multiplier with the multiplicand, and add the results — shifting each result left according to its position.
Think of it like what we do manually, but in binary form.
Since multiplying by 0 gives 0, and multiplying by 1 gives the same number, computers can keep things super simple:
- If the multiplier bit = 1 → Add the multiplicand.
- If the multiplier bit = 0 → Skip adding (just move to the next bit).
Each time we move to the next bit of the multiplier, we shift the multiplicand left (which means multiply it by 2).
🧠 Let’s Understand Step-by-Step
Let’s multiply A = 13 (1101) and B = 11 (1011) using binary shift-and-add.
| Step | Multiplier Bit (from right) | Action | Partial Result |
|---|---|---|---|
| 1 | 1 | Add multiplicand (1101) | 1101 |
| 2 | 1 | Shift multiplicand left → 11010, then add | 1101 + 11010 = 100111 |
| 3 | 0 | Shift left → 110100, skip add | (no change) |
| 4 | 1 | Shift left → 1101000, then add | 100111 + 1101000 = 1001111 |
Final Answer = 10001111 (143 in decimal) ✅
And indeed, 13 × 11 = 143!
🔍 Step-by-Step Breakdown (Simplified)
- Initialize the product = 0.
- Check the least significant bit (LSB) of the multiplier.
- If it’s 1 → Add multiplicand to product.
- If it’s 0 → Skip addition.
- Shift the multiplicand one bit to the left.
- Shift the multiplier one bit to the right (move to next bit).
- Repeat the process for all bits in the multiplier.
- The final product register holds the result.
🧩 Visual Diagram: Shift-and-Add Multiplier
Here’s a simple way to visualize it:
+----------------------------+
| CONTROL UNIT |
+----------------------------+
| ^
v |
+-----------+ +------------+ +-----------+
| Multiplicand|→| ADDER |←--| Multiplier|
+-----------+ +------------+ +-----------+
| |
v |
+-----------+ |
| Shift Left|-----------+
+-----------+
↓
+-----------+
| Product |
+-----------+
👉 The Control Unit checks the multiplier bit,
👉 The Adder performs addition when needed,
👉 The Shifter moves bits to the correct position.
🔢 A Smaller Example (4-bit)
Let’s multiply 6 (0110) × 3 (0011).
| Step | Multiplicand | Multiplier | Action | Product |
|---|---|---|---|---|
| 1 | 0110 | 0011 | LSB=1 → Add 0110 | 0110 |
| 2 | 1100 | 0001 | LSB=1 → Add 1100 | 0110 + 1100 = 10010 |
| 3 | Shift done | Multiplier=0 | Stop | Result = 10010 (18) |
✅ 6 × 3 = 18
It works perfectly!
🧩 Why “Shift and Add”?
- Shift: Multiplying by 2 in binary is just shifting left by one bit.
Example: 101 (5) → 1010 (10). - Add: Each time a multiplier bit is 1, we add the shifted multiplicand to the running total.
So the algorithm cleverly combines these two operations — hence the name Shift-and-Add.
⚙️ Hardware Implementation Concept
Inside a computer:
- The Multiplier is stored in one register.
- The Multiplicand in another.
- The Product Register accumulates the result.
- A Control Circuit moves bits and checks conditions.
Each step, the hardware shifts, checks, and adds automatically — millions of times per second!
🧩 Advantages
| Advantage | Description |
|---|---|
| Simple | Easy to design using adders and shifters |
| Efficient for small numbers | Works well for basic multiplication operations |
| Foundation for advanced algorithms | Basis for Booth’s algorithm and hardware multipliers |
⚠️ Limitations
| Limitation | Description |
|---|---|
| Slow for large numbers | Needs one step per multiplier bit |
| Repetitive shifting and adding | Not ideal for high-speed processors |
| Needs extra logic for signed numbers | Separate handling for negative values |
💬 Everyday Analogy
Think of the Shift-and-Add method like stacking coins:
- Each 1 in the multiplier means “put one more pile of coins” (add the multiplicand).
- Each shift means “move the pile one place to the left,” which doubles the value.
You keep doing this until all bits are processed, and your total pile equals the final product.