Module 04: Unsigned Multiplication (Array & Sequential Multipliers)
Tags: #◇Computer Science #◇CSARCH2 #◇Computer Architecture #◇Hardware Modeling #◇Unsigned Multiplication (Array & Sequential Multipliers)
◇Overview
Binary multiplication forms the mathematical core of scientific computing, graphics rasterization, signal processing, and memory address indexing. This module examines the hardware realization of unsigned binary integer multiplication. We analyze pure combinational Array Multipliers constructed from AND gate arrays and adder reduction matrices, evaluating their critical path delays and silicon area complexity. Furthermore, we formalize the microarchitectural mechanics of Sequential Multipliers, detailing register datapath configurations (), control state machines, and cycle-by-cycle execution traces.
◇Key Definitions
- Multiplicand (): The number being multiplied ( bits).
- Multiplier (): The number by which the multiplicand is multiplied ( bits).
- Partial Product: The intermediate result generated by multiplying the entire multiplicand by a single bit of the multiplier , shifted left by bit positions.
- Bit Product: The boolean AND combination of two individual bits ().
- Array Multiplier: A purely combinational circuit consisting of a grid of AND gates producing partial product bits, reduced through a two-dimensional matrix of Half Adders and Full Adders.
- Sequential Multiplier: A sequential synchronous hardware datapath that computes the -bit product over consecutive clock cycles using a single -bit adder, shift registers, and a down-counter.
- Carry Flip-Flop (): A 1-bit register that captures the carry-out generated during the addition of the multiplicand to the accumulator ().
- Logical Shift Right (): A shift operation where all bits shift right by one position, the carry bit shifts into the MSb of the accumulator (), the LSb of () shifts into the MSb of (), and a
0enters .
◇Theoretical Framework / Core Concepts
1. Mathematical Formulation of Unsigned Multiplication
Let and be two -bit unsigned integers. Their product is a -bit unsigned integer:
Paper-and-Pencil Multiplication (4-bit Example):
M3 M2 M1 M0 (Multiplicand M)
x Q3 Q2 Q1 Q0 (Multiplier Q)
------------------------
M3Q0 M2Q0 M1Q0 M0Q0 (Partial Product 0)
M3Q1 M2Q1 M1Q1 M0Q1 0 (Partial Product 1 << 1)
M3Q2 M2Q2 M1Q2 M0Q2 0 0 (Partial Product 2 << 2)
+ M3Q3 M2Q3 M1Q3 M0Q3 0 0 0(Partial Product 3 << 3)
------------------------------------------------------------
P7 P6 P5 P4 P3 P2 P1 P0 (8-bit Product)
Each single-bit product is computed with a single 2-input AND gate because:
2. Combinational Array Multiplier Architecture
An array multiplier uses an grid of AND gates to generate all bit products in parallel, feeding into a matrix of adders:
4x4 Array Multiplier Topology:
M3 M2 M1 M0
| | | |
Q0 -------+--------+--------+--------+---> [Row 0: 4 AND Gates] ---------> P0
| | | |
Q1 -------+--------+--------+--------+---> [Row 1: 4 AND Gates + 4 Adders] -> P1
| | | |
Q2 -------+--------+--------+--------+---> [Row 2: 4 AND Gates + 4 Adders] -> P2
| | | |
Q3 -------+--------+--------+--------+---> [Row 3: 4 AND Gates + 4 Adders] -> P3
|
v
[P7, P6, P5, P4]
Hardware & Complexity Analysis:
- AND Gate Count: Exactly gates.
- Adder Count: Full/Half Adders ( Half Adders in the first stage, Full Adders in subsequent stages).
- Silicon Area: Scales quadratically as .
- Critical Path Latency:
Trade-off: High speed (computes result in 1 combinational clock cycle), but prohibitive silicon area cost for large word sizes (e.g., 64-bit multiplier requires 4,096 AND gates and over 4,000 adders).
3. Sequential Circuit Multiplier Architecture
To conserve hardware area, the sequential multiplier uses a single -bit parallel adder and reuses registers over clock cycles:
+--------------------------------------------------------------------------+
| SEQUENTIAL MULTIPLIER DATAPATH |
| |
| +------------------------------------+ |
| | Multiplicand Register (M) | (n bits) |
| +------------------------------------+ |
| | |
| v |
| +----------------------+ |
| | n-bit CLA Adder | |
| +----------------------+ |
| ^ |
| | |
| v |
| +---+ +-------------------------+ +-------------------------+ |
| | C | ---> | Accumulator Register (A)| ---> | Multiplier Register (Q) | |
| |1b | | (n bits, init to 0) | | (n bits, holds Q) | |
| +---+ +-------------------------+ +-------------------------+ |
| ^ | | | |
| | +------- Logical Shift Right <---+ | |
| | (LSR) | |
| | v |
| +-------------------- Control Logic <---------------------- [ Q0 ] |
| (Counter = n) |
+--------------------------------------------------------------------------+
Algorithm Execution Flow (Per Clock Cycle):
- Test LSB of Multiplier ():
- If : Add multiplicand to accumulator:
- If : No addition occurs ( remains unchanged, ).
- If : Add multiplicand to accumulator:
- Logical Shift Right ():
- Shift the combined composite register right by 1 bit:
- Shift the combined composite register right by 1 bit:
- Loop Control:
- Decrement the cycle counter: .
- If , repeat from Step 1.
- When , the -bit product resides across registers (where contains the upper bits and contains the lower bits).
◇Worked Examples / Calculations / Hardware Traces
Example 1: 4-Bit Sequential Multiplier Execution Trace
Problem: Multiply unsigned 4-bit integers and using the sequential shift-and-add hardware multiplier. Show the complete cycle-by-cycle register trace table.
Solution:
- Multiplicand
- Initial state: , , , .
- Expected final product: .
Execution Trace Table:
| Cycle | Operation | Count | Notes | |||
|---|---|---|---|---|---|---|
| 0 | Initialization | 0 | 0000 | 1101 | 4 | Load , , clear |
| 1 | 0 | 1011 | 1101 | 4 | , no carry () | |
| LSR | 0 | 0101 | 1110 | 3 | Shift right 1 bit | |
| 2 | 0 | 0101 | 1110 | 3 | , skip addition | |
| LSR | 0 | 0010 | 1111 | 2 | Shift right 1 bit | |
| 3 | 0 | 1101 | 1111 | 2 | , | |
| LSR | 0 | 0110 | 1111 | 1 | Shift right 1 bit | |
| 4 | 1 | 0001 | 1111 | 1 | ||
| LSR | 0 | 1000 | 1111 | 0 | shifts into ; Count reaches 0 |
- Final Register Contents:
- (High 4 bits)
- (Low 4 bits)
- Combined Product
- Decimal Verification:
Example 2: Critical Path Delay Comparison (Array vs Sequential)
Problem: An engineering team evaluates building a 32-bit unsigned multiplier:
- Option A: Combinational Array Multiplier where , , .
- Option B: Sequential Multiplier running at (), taking 32 clock cycles.
Calculate the total multiplication latency for both implementations.
Solution:
-
Option A (Array Multiplier):
-
Option B (Sequential Multiplier):
Analysis: While both yield similar total latencies (), Option B requires less than of the silicon area, freeing up die area for on-chip caches.
◇Complexity Analysis / Common Pitfalls
- Applying Unsigned Multipliers to Signed Negative Numbers: A critical error is attempting to multiply negative 2's complement numbers using this unsigned shift-and-add algorithm. Because negative numbers have leading
1s (due to sign weight ), treating them as unsigned leads to grossly incorrect positive results. Signed multiplication requires Booth's algorithm or sign-correction logic. - Forgetting to Capture Carry in Flip-Flop : In sequential multiplier hardware, when , the generated carry bit must be shifted into the MSB of during the subsequent LSR. Discarding results in truncation errors.
- Logical vs. Arithmetic Shift Right: Sequential unsigned multiplication strictly requires a Logical Shift Right (inserting
0into ), whereas signed multiplication requires an Arithmetic Shift Right (retaining the sign bit).
◇References & Navigation
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
In an -bit sequential unsigned multiplier, what is the size of the final product and where is it stored?
How many 2-input AND gates are required to construct an combinational array multiplier?
During cycle of an unsigned sequential multiplication, the multiplier bit . What action does the hardware datapath perform?
Why can an unsigned sequential multiplier not be used directly on negative 2's complement integers?
If an 8-bit sequential multiplier operates at a clock frequency of , how long does it take to compute an 8-bit 8-bit multiplication?