next up previous contents
Next: Division (割り算) Up: Fixed-Point Arithmetic (固定小数点) Previous: Addition and Subtraction (足し算・引き算)

Multiplication (掛け算)



        x3 x2 x1 x0 Multiplicand
        y3 y2 y1 y0 Multiplier
      (xy0)4 (xy0)3 (xy0)2 (xy0)1 (xy0)0 pp0
    (xy1)4 (xy1)3 (xy1)2 (xy1)1 (xy1)0   pp1
  (xy2)4 (xy2)3 (xy2)2 (xy2)1 (xy2)0     pp2
(xy3)4 (xy3)3 (xy3)2 (xy3)1 (xy3)0       pp3
p7 p6 p5 p4 p3 p2 p1 p0  



Unsigned array multiplier (3-bit)


\includegraphics[width=14cm]{/home/david/courses/comparch/lectures/arith/figs/arraymult.eps}

Signed multiplication

2's complement series parallel multiplier (4-bit)


  
Figure 4.2: A 4-bit 2's complement series parallel multiplier
\includegraphics[width=12cm]{/home/david/courses/comparch/lectures/arith/figs/2scompmult.eps}

Operation (refer to Figure 4.2)
1.
clear the accumulator
2.
add the product of x and y0
3.
shift accumulator and y registers right by 1 bit
4.
repeat 2-3 if y3 is not in the rightmost position
5.
subtract the product of x and y3



Example

6 $\rightarrow$   0 1 1 0        
$\times -5 \rightarrow$ $\times $ 1 0 1 1        
pp0 (subtract=0) 0 0 1 1 0        
add/shift (accum.) 0 0 0 1 1 0      
pp1 (subtract=0) 0 0 1 1 0        
add/shift (accum.) 0 0 1 0 0 1 0    
pp2 (subtract=0) 0 0 0 0 0        
add/shift (accum.) 0 0 0 1 0 0 1 0  
pp3 (subtract=1) 1 1 0 1 0        
add (accum.) 1 1 1 0 0 0 1 0 $\rightarrow -30$


next up previous contents
Next: Division (割り算) Up: Fixed-Point Arithmetic (固定小数点) Previous: Addition and Subtraction (足し算・引き算)
David Asano
2001-05-29