Professional Documents
Culture Documents
D S A K: Igital Esign
D S A K: Igital Esign
Fall 2002
Multipliers
Engineering Education Trust Center for Advanced Studies in Engineering
Multipliers
SequentialandArrayMultipliers
Atleastonegoodreasonforstudyingmultiplicationand divisionisaninfinitenumberofwaysofperformingthese division is an infinite number of ways of performing these operationsandhencethereisaninfinitenumberofPhDs (or expensivepaidvisitstoconferencesinUSA)tobewonfrom inventingnewformsofmultipliers inventing new forms of multipliers AlanClements ThePrinciplesofComputerHardware,1986
Adv. Digital Design By Dr. Shoab A. Khan 3
Multiplier
Basicideaisprettysimple,multiplyingA,andBtwoNbits numbers
A*B=P A*B=P
DonebygeneratingNnumberofpartialproducts,andaddingthem together:
Rowofdotsisapartialproduct: fd i i l d
Unsigned Multiply
a3
a1 b1 a1b0 a0b1
a0 b0 a0b0
p1
p0
Unsignedshiftaddmultiplier(design1)
64bitMultiplicandreg,64bitALU, 64bitProductreg,32bitmultiplierreg
Unsignedshiftaddmultiplier(version 1) )
10
Observations
1/2bitsinmultiplicandalways0
64 bit dd i 64bitadderiswasted t d
0sinsertedinleftofmultiplicandasshifted
leastsignificantbitsofproductneverchanged onceformed
Insteadofshiftingmultiplicandtoleft, shiftproducttoright? p g
Adv. Digital Design By Dr. Shoab A. Khan 11
MULTIPLYHARDWARE(Design2)
32bitMultiplicandreg,32bitALU, 64bitProductreg,32bitMultiplierreg
14
Design3
32bitMultiplicandreg,32bitALU,64bitProductreg,(0bit Multiplierreg)
Prod
0 A Shift_reg A
n-bit Adder
mux 1
16
Example
17
Signed Multiplier
21
ParallelMultipliers
22
Digitalmultiplicationflow
Nbitinputsoperands(N=4)
PartialProductArrayGeneration =N
shiftedbinarynumbers hift d bi b Partial Product Array Reduction PartialProductArrayReduction =reductionto2binarynumbers Finaladdition =2nbitfinalproduct
Adv. Digital Design By Dr. Shoab A. Khan 24
Multiplier
Multiplier Multiplication Formation of Partial Products
Product P d t
Partialproductgenerationfor6bitby6bitmultiplication
multiplier a5 a0
multiplicand b5 b0
ppij
columns to be added
PartialProductGeneration
UseanarrayofANDgatestoproducepartialproductsinparallel
Level ( n+1)
sum carry
sum carry
(Full Adder)
(Half Adder)
No action
Three d are shown h dots h Each symbolizes a partial product Using U i FA reduces th d these t t bit to two bits One has the weight of 20(sum) The other has the weight of 21(carry) This type of reduction is known as 3 to 2 reduction or carry saves reduction y The two dots are reduced to 2 using a HA
12x12CarrySaveReduction Scheme
Level 1
HA
FA
FA
FA
FA
FA
HA
P0
Level 2
HA
FA
FA
FA
FA
FA
HA
P1
Level 3
HA
FA
FA
FA
FA
FA
HA
P2
Level 4
HA
FA
FA
FA
FA
FA
HA
P3
PC10
PS9 PC9
PS8PC8
PS7PC7
PS6PC6
PS5PC5
PS4 PC4
PS3
AdderLevelsinWallaceTreeReductionScheme
Number of partial Products 3 4 5n6 7n9 10 n 13 14 n 19 20 n 28 29 n 42 43 n 63 Number of full adder Levels 1 2 3 4 5 6 7 8 9
6x6Wallacetree
X = xi 2 xn 1 2
i i =0
n 1
IF S=0
IF S=1
S SX SXX 10 00
S X X X 0
S X X X X 0
XXXX XXX XX X
CorrectionVectorComputation
Example
00111101101111011101 00111101101111100101 00111101110000100101 00111110010000100101
String String String String
01000010010000100101
Hence the number of 1(s) has reduced from 14 to 6. Both have the same value. l
Boothrecodingmakesuseofthe stringproperty. gp p y
TwoWaysofSpeedUp
acceleratetheaccumulation Partialproductreductiontechnique reducethenumberofpartialproducts d h b f i l d modifiedBoothrecoding
x x + +
010: startandendofastringatbit0,codedas21 20 =+1. 011: anendofstringatbitlocation0,codedas21=+2 100: astartofastringatbitlocation1;codedas21=2 101: astartofastringatbitlocation1andanendofstring 1 0 1: a start of a string at bit location 1 and an end of string athighbitlocationofthepreviouspair,21 + 20=1
BoothRecodingTable
A= B=
10 10
10 10
11 11
01 01
For these two bits Booths algorithm restricts the value to be (-2, -1, 0, +1,+2) +2 means Shift left A by one +1 means Copy A in the answer 0 means copy all 0s 0s -1 means 2s complement and then copy -2 means 2s complement and then shift left
As the string property is applied on three bits there bits, are following eight possibilities: 21=2 20=1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 2 -2 2 -1 -1 1 0
Example!
X
10101101 1 0 0 0 1 1 0 10
Example!
10 11 01 -2 +1 -1 1 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 0 0 1
1 0 1 0 0
1 0 1 1 0
1 0 1 0 1
1 0 1 0 1
1 0 0 1 1
BoothRecoder
0 b b0 1 BR0
a 0 2 a a 2 a a 0 2 a a 2 a a 0 2 a a 2 a a 0 2 a a 2 a
5:1
b2 b3
BR1
b4 b5
BR2
b6 b7
BR3
5:1
Adder
Shortcut to VERIWELL.lnk