Professional Documents
Culture Documents
Multipliers
Multipliers
1
A
B
X P
Multipliers
• A must have circuit in most DSP applications
• A variety of multipliers exists that can be chosen
based on their performance
• Serial, Serial/Parallel,Shift and Add, Array, Booth,
Wallace Tree,….
2
A
B
X P
reset
en
reset
en
converter RA
16x16 Converter
multiplier RC
reset
en
converter RB
3
A
B
X P
Multiplication Algorithm
X= Xn-1 Xn-2 ………..……X0 Multiplicand
Y=Yn-1 Yn-2……………….Y0 Multiplier
4
1. Multiplication Algorithms
Implementation of multiplication of binary numbers boils down to how to do the additions.
Consider the two 8 bit numbers A and B to generate the 16 bit product P. First generate the 64
partial Products and then add them up.
5
A
B
X P
Multiplier Design
Storage
R R
E E
G G
MU
I ( Multiplier Unit) O
N U
T
Control Unit
6
X: x3x2x1x0 Y:y 3y2y1y0
Serial Multiplier Input Sequence for G1:
A
B
X P
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Reset:010000100001000010000
0 d 1-bit q
Reset=0 G2 REG
CLK
1
0 0
x0y0
+ 0 0 0 0
x0 0
y0 G1 x0y0
Serial Register
CLK CLK/(N+1)
Slide 1
7
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Reset:010000100001000010000
0 d 1-bit q
Reset=0 G2 REG
CLK
1
0 0
x1y0
+ S0 0 0 0
x1 0
y0 G1 x1y0
Serial Register
CLK CLK/(N+1)
Slide 2
8
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Reset:010000100001000010000
0 d 1-bit q
Reset=0 G2 REG
CLK
1
0 0
x2y0
+ x1y0 S0 0 0
x2 0
y0 G1 x2y0
Serial Register
CLK CLK/(N+1)
Slide 3
9
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Reset:010000100001000010000
0 d 1-bit q
Reset=0 G2 REG
CLK
1
0 0
x3y0
+ x2y0 x1y0 S0 0
x3 0
y0 G1 x3y0
Serial Register
CLK CLK/(N+1)
Slide 4
10
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Reset:010000100001000010000
S0 d 1-bit q
Reset=1 G2 REG
0 CLK
0 0
0
+ x3y0 x2y0 x1y0 S0
0 0
0 G1 0
Serial Register
CLK CLK/(N+1)
Slide 5
11
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Reset:010000100001000010000
x1y0 d 1-bit q
Reset=0 G2 REG
1 CLK
x1y0
C1
S1
+ 0 x3y0 x2y0 x1y0 S0
x0 0
G1 x0y1
y1
Serial Register
CLK CLK/(N+1)
Slide 6
12
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
x2y0 d 1-bit q
Reset=0 G2 REG
1 CLK
x2y0
C20
S20
+ S1 0 x3y0 x2y0 S0
x1 C1
G1 x1y1
y1
Serial Register
CLK CLK/(N+1)
Slide 7
13
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
x3y0 d 1-bit q
Reset=0 G2 REG
1 CLK
x3y0
C30
S30
+ S20 S1 0 x3y0 S0
x2 C20
G1 x2y1
y1
Serial Register
CLK CLK/(N+1)
Slide 8
14
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
0 d 1-bit q
Reset=0 G2 REG
1 CLK
0
C40
S40
+ S30 S20 S1 0 S0
x3 C30
G1 x3y1
y1
Serial Register
CLK CLK/(N+1)
Slide 9
15
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S1 d 1-bit q
Reset=1 G2 REG
0 CLK
0
C50=0
S50
+ S40 S30 S20 S1 S0
0 C40
G1 0
0
Serial Register
CLK CLK/(N+1)
Slide 10
16
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S20 d 1-bit q
Reset=0 G2 REG
1 CLK
S20
C21
S2
+ 0
S50 S40 S30 S20 S1 S0
x0
G1 x0y2
y2
Serial Register
CLK CLK/(N+1)
Slide 11
17
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S30 d 1-bit q
Reset=0 G2 REG
1 CLK
S30
C31
S31
+ C21
S2 S50 S40 S30 S1 S0
x1
G1 x1y2
y2
Serial Register
CLK CLK/(N+1)
Slide 12
18
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S40 d 1-bit q
Reset=0 G2 REG
1 CLK
S40
C41
S41
+ C31
S31 S2 S50 S40 S1 S0
x2
G1 x2y2
y2
Serial Register
CLK CLK/(N+1)
Slide 13
19
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S50 d 1-bit q
Reset=0 G2 REG
1 CLK
S50
C51
S51
+ C41
S41 S31 S2 S50 S1 S0
x3
G1 x3y2
y2
Serial Register
CLK CLK/(N+1)
Slide 14
20
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S2 d 1-bit q
Reset=1 G2 REG
0 CLK
0
C60=0
S60
+ C51
S51 S41 S31 S2 S1 S0
0
G1 0
0
Serial Register
CLK CLK/(N+1)
Slide 15
21
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S31 d 1-bit q
Reset=0 G2 REG
1 CLK
S31
C32
S3
+ 0
S60 S51 S41 S31 S2 S1 S0
x0
G1 x0y3
y3
Serial Register
CLK CLK/(N+1)
Slide 16
22
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S41 d 1-bit q
Reset=0 G2 REG
1 CLK
S41
C42
S4
+ C32
S3 S60 S51 S41 S2 S1 S0
x1
G1 x1y3
y3
Serial Register
CLK CLK/(N+1)
Slide 17
23
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S51 d 1-bit q
Reset=0 G2 REG
1 CLK
S51
C52
S5
+ C42
S4 S3 S60 S51 S2 S1 S0
x2
G1 x2y3
y3
Serial Register
CLK CLK/(N+1)
Slide 18
24
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S60 d 1-bit q
Reset=0 G2 REG
1 CLK
S60
C61
S6
+ C52
S5 S4 S3 S60 S2 S1 S0
x3
G1 x3y3
y3
Serial Register
CLK CLK/(N+1)
Slide 19
25
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
S3 d 1-bit q
Reset=1 G2 REG
0 CLK
S7
+ C61
S6 S5 S4 S3 S2 S1 S0
0
G1 0
0
Serial Register
CLK CLK/(N+1)
Slide 20
26
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
d 1-bit q
Reset=0 G2 REG
1 CLK
+ 0
S7 S6 S5 S4 S3 S2 S1 S0
0
G1 0
0
Serial Register
CLK CLK/(N+1)
Slide 21
27
Si: the ith bit of the final result X: x3x2x1x0 Y:y 3y2y1y0
Ci: the only carry from column i Input Sequence for G1:
00x3x2x1x00 x3x2x1x0 0x3x2x1x0 0x3x2x1x0
Sij: the jth partial sum for column i
00y 3y3y3y3 0y 2y2y2y2 0y 1y1y1y1 0y 0y0y0y0
Cij: the jth partial carry from column i
Reset:010000100001000010000
d 1-bit q
Reset=0 G2 REG
1 CLK
+ 0
S7 S6 S5 S4 S3 S2 S1 S0
0
G1 0
0
Serial Register
CLK CLK/(N+1)
Slide 21
28
Si: the ith bit of the final result
A
B
X P
Serial / Parallel
Multiplier
y0 y1 y2 y3
x0
D D D
0 0 0
0 0 0
S0 S0 S0
+ + S0
+ S0
D 0 D 0 D 0
Slide 1
29
Si: the ith bit of the final result
Ci: the only carry from column i A
B
X P
y0 y1 y2 y3
x1 x0
D D D
0 0
x0y1 0 0
x1y0 S1 S1 S1
+ + + S1 S0
C1
D 0 D 0 D 0
Slide 2
30
Si: the ith bit of the final result
Ci: the only carry from column i
A
Sij: the jth partial sum for column i
Cij: the jth partial carry from column i
B
X P
y0 y1 y2 y3
x2 x1 x0
D D D
0
x1y1 x0y2 0
x2y0 S20 S2 S2
+ + + S2 S1 S0
C20 C21
D C1 D 0 D 0
Slide 3
31
Si: the ith bit of the final result
Ci: the only carry from column i A
y0 y1 y2 y3
x3 x2 x1
D D D
x0
D C20
D C21
D 0
Slide 4
32
Si: the ith bit of the final result
Ci: the only carry from column i A
y0 y1 y2 y3
0 x3 x2 x1
D D D
D C30
D C31
D C32
Slide 5
33
Si: the ith bit of the final result
A
Ci: the only carry from column i
y0 y1 y2 y3
x3 x2
D D D
0 0
0 x3y2 x2y3
0 C40 S51 S5
+ + + S5 S4 S3 S2 S1 S0
0 C50 C51
D C40
D C41
D C42
Slide 6
34
Si: the ith bit of the final result
A
Ci: the only carry from column i
y0 y1 y2 y3
x3
D D D
0 0 0
0 0 x3y3
0 0 C50 S6
+ + + S6 S5 S4 S3 S2 S1 S0
0 0 C6
D 0 D C50
D C51
Slide 7
35
Si: the ith bit of the final result
A
Ci: the only carry from column i
B
X P
y0 y1 y2 y3
0
D D D
0 0 0
0 0 0
0 0 0 S7
+ + + S7 S6 S5 S4 S3 S2 S1 S0
0 0 0
D 0 D 0
D C6
Slide 8
36
Shift AND Add Multiplier A
REGA
MUX
REGC REGB
37
A
B
X P Synchronous Shift and Add Multiplier
controller
Multiplication process:
5 states: Idle, Init, Test, Add, and Shift&Count.
Idle: Starts by receiving the Start signal;
Init: Multiplicand and multiplier are loaded into a load
register and a shift register, respectively;
Test: The LSB in the shift register which contains the
multiplier is tested to decide the next state;
38
A
B
X P
Add: If LSB is ‘1’, then next state is to add the new partial product to the
accumulation result, and the state machine transits to shift&count state ;
Shift&Count: If LSB is ‘0’, then the two shift register shift their contains
one bit right, and the counter counts up by one step. After that, the state
machine transits back to test state;
When the counter reaches to N , a Stop signal is asserted and the state
machine goes to the idle state;
Idle: In the idle state, a Done signal is asserted to indicate the end of
multiplication.
39
n-bit Multiplier:
Q0=1: Multiplicand is added to register A; the result is stored in register A; registers C, A, Q are shifted to the right
one bit
Q0=0: Registers C, A, Q are shifted to the right one bit
Multiplicand
Shift Right
Multiplier
Slide 1
40
Example: 4-bit Multiplier
A
Initial Values
B
X P
Multiplicand
1 0 1 1
Shift Right
0 0 0 0 0 1 1 0 1
Multiplier
Slide 2
41
Example: 4-bit Multiplier
First Cycle--Add A
B
X P
Multiplicand
1 0 1 1
Shift Right=0
0 1 0 1 1 1 1 0 1
Multiplier
Slide 3
42
Example: 4-bit Multiplier
A
First Cycle--Shift
B
X P
Multiplicand
1 0 1 1
Shift Right=1
0 0 1 0 1 1 1 1 0
Multiplier
Slide 4
43
Example: 4-bit Multiplier
Second Cycle--Shift A
B
X P
Multiplicand
1 0 1 1
Shift Right=1
0 0 0 1 0 1 1 1 1
Multiplier
Slide 5
44
Example: 4-bit Multiplier
A
Third Cycle--Add
B
X P
Multiplicand
1 0 1 1
Shift Right=0
0 1 1 0 1 1 1 1 1
Multiplier
Slide 6
45
Example: 4-bit Multiplier
Third Cycle--Shift A
B
X P
Multiplicand
1 0 1 1
Shift Right=1
0 0 1 1 0 1 1 1 1
Multiplier
Slide 7
46
Example: 4-bit Multiplier
Fourth Cycle--Add A
B
X P
Multiplicand
1 0 1 1
Shift Right=0
1 0 0 0 1 1 1 1 1
Multiplier
Slide 8
47
Example: 4-bit Multiplier
Fourth Cycle--Shift A
B
X P
Multiplicand
1 0 1 1
Shift Right=1
0 1 0 0 0 1 1 1 1
Multiplier
Slide 9
48
A
B
X P
4*4 Synchronous Shift and Add Multiplier Design
Layout Design
49
A
B
X P
.
50
A
Example : (simulated by Ovais Ahmed)
B
X P
51
A
B
X P
Array Multiplier
52
A
Addition with CLA
B
X P
a3 a2 a1 a0
b0
A = a3a2a1a0
B = b3b2b1b0
a3 a2 a1 a0
b1
Ci
Cout Four-bit Adder 0
n
a3 a2 a1 a0
b2
a3 a2 a1 a0
b3
53
Product (A*B)
A
B
X P
B2
0i3 P13 P22 P21 P20
0 j3 B3
Ci Si Ci Si Ci Si
P33 0
Ci Si Ci Si Ci Si
54
R7 R6 R5 R4 R2 R1 R0
R3
A
B
X P
Critical Path with Array Multipliers
FA FA FA HA
FA FA FA HA
FA FA FA HA
Two of the possible paths for the Ripple-Carry based 4*4 Multiplier
Area = (N*N) AND Gate + (N-1)N Full-Adder
Delay = τ HA + (2N-1) τ FA
55
A
B
X P
56
A
B
X
P9
P
x4y4
P8
+
x3y4
P7
+
+
x4y3
x2y4
P6
+
+
+
x3y3
x4y2
x1y4
x2y3
x3y2
P5
+
+
+
+
x4y1
x0y4
x1y3
x2y2
P4
+
+
+
+
x3y1
x4y0
Wallace Tree
x0y3
x1y2
x2y1
P3
+
+
+
x3y0
x0y2
x1y1
P2
+
+
P1 x2y0
x0y1
+
x1y0
x0y0
P0
57
A
B
X P
58
A
B
X P
Baugh-Wooley Algorithm
Convert negative partial products to positive representation
• No sign-extension required
k 2 k 2
X * Y ( xk 1 * 2 k 1
xi * 2 ) * ( yk 1 * 2
i k 1
yi * 2 i )
i 0 i 0
k 2 k 2 k 2 k 2
( xk 1 * yk 1 * 2 2 k 2
xi y j * 2 ) xk 1 yi * 2
i j k 1i
yk 1 xi * 2 k 1i
i 0 j 0 i 0 i 0
3/10/2018 59 59
A
a4' b4'
a4b4
1 FA FA a3'b4 FA a2'b4 FA a1'b4 FA a0'b4
a4
FA FA FA FA FA FA b4
P9 P8 P7 P6 P5 P4 P3 P2 P1
P0
The schematic logic circuit diagram of a 5-by-5 Baugh-Wooley two’s complement array multiplier
3/10/2018 60
A
Squarer using Baugh-Wooley Algorithm
B
X P
a7 a6 a5 a4 a3 a2 a1 a0
* a7 a6 a5 a4 a3 a2 a1 a0
-------- ------- -------- ------- -------- -------- ------- -------- -------- ------- -------- ------- -------- ------- --------
----- ------ ----- ------ ----- ----- ------ ----- ----- ------ ----- ------ ----- ------ -----
-------- ------- -------- ------- -------- -------- ------- -------- -------- ------- -------- ------- -------- ------- -------- 61
----- ------ ----- ------ ----- ----- ------ ----- ----- ------ ----- ------ ----- ------ -----
B
X P
‘0’
a6a3
a7a2 a5a4
a3a4 a3
‘0’
‘0’
a6a5 a6a4
a7a4 a6 a7a3
a5 a4
‘0’
a7
a7a6 a7a5
‘0’
62
A
B
X P
Array Multiplier
32bits by 32bits multiplier
63
A
64
Ki is calculated by following equation
65
A
B
X P
Booth Algorithm
Decoding of multiplier to generate signals for hardware use
0 0 0 0 0 1 0
1 0 0 2 1 0 1
0 1 0 1 0 0 0
1 1 0 1 1 0 0
0 0 1 1 0 0 0
1 0 1 1 1 0 0
0 1 1 2 0 0 1
1 1 1 0 1 1 0
66
A
B
X P
Booth Algorithm
A Booth recoded multiplier examines
Three bits of the multiplicand at a time
It determine whether to add zero, 1, -1, 2, or -2 of that rank of
the multiplicand.
The operation to be performed is based on the current two bits
of the multiplicand and the previous bit
Xi+1 X Xi-1 Zi/2
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 2
1 0 0 -2
1 0 1 -1
1 1 0 -1
1 1 1 0 67
BIT M is
multiplied
OPERATION
21 20 2-1 by
Xi Xi+1 Xi+2
68
A
B
X P
Multiplicand A = ● ●●●
Multiplier B= (●●)(●●)
69
A
Example B
X P
The following example is used to show how the calculation is done properly.
Added to
Multiplicand X = 000011 the
multiplier
Multiplier Y = 011101 0 1 1 1 0 1 0
After booth decoding, Y is decoded as to multiply X by +2, -1, +1 separately, then shift the partial
product two bits and add them together.
X* +1 000000000011
X* -1 1111111101
X* +2 00000110
--------------------------------------------
000001010111
70
A
B
X P
Sign Extension
71
A
B
X P
Sign extension
Traditional sign-extension scheme
• Segment the input operands based on the size of
embedded blocks
• Multiply the segmented inputs and extend the sign bit of
each partial products
• Sum all partial products
Segmented input
× operands
Sign extension
partial
products
+
Sign Final result
3/10/2018 Concordia VLSI Lab 72 72
A
B
X P
Booth Algorithm-Example 1
Example 1:
000011 (+3)
011101 0 (+29)
+2 -1 +1
000000000011
1111111101
00000110
1 000001010111 (+87)
73
A
B
X P
Notice sign
extensions 111101 (-3)
011101 0 (+29)
+2 -1 +1
2s complement of 111111111101
0000000011
multiplicand
11111010
1 111110101001 (-87)
74
A
B
X P
Booth Algorithm-Example 3
B
X P
76
Template to reduce sign extensions for Booth
Algorithm
Please note that each operand is 17 bit ie. the 17th bit is the sign bit. Also
negative numbers are entered as 1’s complement, this is why you need to
add the S in the right hand side of the diagram. If you use 2’complement
then the S’s on right side of the diagram can be removed
77
A
B
X P
A A
B B
S1 S1 S1 S1 S1 S1 S1 S1 S1 S1
1 S2 S2 S2 S2 S2 S2
S3 S3 S3 S3
S4
P P
Sign template Sign extension
78
3 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 9 8 7 6 5 4 1 0
3 2
2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
A A
S S S A A A A A A A A A A A A A A A
0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
A A
1 S A A A A A A A A A A A A A A A
1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 S A A A A A A A A A A A A A A A A A
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
Partial
1 S A A A A A A A A A A A A A A A A A
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 Product
matrix
1 S A A A A A A A A A A A A A A A A A generated for
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
a 16 * 16 bit
multiplication
1 S A A A A A A A A A A A A A A A A A
5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 ,
Using booth
1 S A A A A A A A A A A A A A A A A A
6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
and the
template
A A A A A A A A A A A A A A A A A A given in
7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
previous slide
S A A A A A A A A A A A A A A A A
8
8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
79
A
B
X P
Example of using the template
25 * - 35 with -35 as the multiplier. Using 8 bit representation
00011001
Add SS 110111010
Add inverted S
Add Inverted sign and add 1
10000011001 * 1
Add Inverted sign bit 1011100111 * -1
100110010 * 2
No sign bit 1100111 * -1
11110010010101
This is a –ve number. Convert it
00001101101011
80