Professional Documents
Culture Documents
Lec-2 ALU Multiplication CompArch Wali
Lec-2 ALU Multiplication CompArch Wali
ALU-2
Multiplication
CSE-2823
Computer Architecture
Ref:
Ch-9 Stallings
Ch-3 Hennessy-Petterson
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET 2
Multiplication
• Complex
• Work out partial product for each digit
• Take care with place value (column)
• Add partial products
Note:
1. Need double length for storing result
2. Add and shift to achieve multiplication
Dr. Md. Waliur Rahman Miah Dept of CSE, DUET
Unsigned Binary Multiplication
FIGURE 3.3: First version of the multiplication hardware. (Source: Patterson- Pg-184)
Flowchart for
Unsigned Binary
Multiplication
Multiplier
Result = ( + 21 )
Example of Booth’s Algorithm-2
Multiplicand = M = +7 = 0111
Multiplier = Q = -3 = 1101
A Q Q-1 M Comments
0000 1101 0 0111 Initial Values
1001 1101 0 0111 Q0Q-1 = 10; A <= A-M
1100 1110 1 0111 Right-Shift AQQ-1 preserve sign bit
0011 1110 1 0111 Q0Q-1 = 01; A <= A+M
0001 1111 0 0111 Right-Shift AQQ-1 preserve sign bit
1010 1111 0 0111 Q0Q-1 = 10; A <= A-M
1101 0111 1 0111 Right-Shift AQQ-1 preserve sign bit
1101 0111 1 0111 Q0Q-1 = 11; A <= A (no change)
1110 1011 1 0111 Right-Shift AQQ-1 preserve sign bit
Result = ( - 21 )
Product = AQ = 11101011 = -21
Faster Multiplication
FIGURE 3.7 Fast multiplication hardware. Rather than use a single 32-bit adder 31 times,
this hardware “unrolls the loop” to use 31 adders and then organizes them to minimize
delay.