Multiplication – Computer Arithmetic

💡 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.

StepMultiplier Bit (from right)ActionPartial Result
11Add multiplicand (1101)1101
21Shift multiplicand left → 11010, then add1101 + 11010 = 100111
30Shift left → 110100, skip add(no change)
41Shift left → 1101000, then add100111 + 1101000 = 1001111

Final Answer = 10001111 (143 in decimal)
And indeed, 13 × 11 = 143!


🔍 Step-by-Step Breakdown (Simplified)

  1. Initialize the product = 0.
  2. Check the least significant bit (LSB) of the multiplier.
  • If it’s 1 → Add multiplicand to product.
  • If it’s 0 → Skip addition.
  1. Shift the multiplicand one bit to the left.
  2. Shift the multiplier one bit to the right (move to next bit).
  3. Repeat the process for all bits in the multiplier.
  4. 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).

StepMultiplicandMultiplierActionProduct
101100011LSB=1 → Add 01100110
211000001LSB=1 → Add 11000110 + 1100 = 10010
3Shift doneMultiplier=0StopResult = 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

AdvantageDescription
SimpleEasy to design using adders and shifters
Efficient for small numbersWorks well for basic multiplication operations
Foundation for advanced algorithmsBasis for Booth’s algorithm and hardware multipliers

⚠️ Limitations

LimitationDescription
Slow for large numbersNeeds one step per multiplier bit
Repetitive shifting and addingNot ideal for high-speed processors
Needs extra logic for signed numbersSeparate 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.