ࡱ> uxvwza߿ߝXo( UUUUzag\Oy Ek( DD`!\X&.E*j4@0xڍKBQ=OKRE-ESPi@5h44ҖDS{ J{= ! qE\|!cbibgE,2+ۇ:?.}< @ L*5.Zxx㇕Ly;]ԅO3Ja|Lr2ŏ=;~r ovPpsCK Qg=v |-wHU|vhmu-[U<$EŏK7[Wc#Vw5DNf^0p;N%Jgu?i <>Ѹa^Uu>1O(}gc}6H_Nu[嬜 Q^;[c^Q;9sc-CE %o0_& y!tF1=v]\U^'D~{"$i647yJ .fSͮ͟@MuGĹ7 `!ӓ)w7H_MH @(Zxڕ1KP.iĂA(Sp-Tlw!`{  &ZlYn]:#nQIj||Tq{{! @~%l)!r)2:gzuU^Vy6 "pOD4۽Bjpu \ $pqX$"ky1{xV:/[Cpb҆μ%'tVR; .A؍MIS;eS8[عΒͧeu3SrKsļ] )ۊLO})Lu.Tm#f;0=?u_q|X3(   #vEquation Equation.30,Microsoft Equation 3.0vEquation Equation.30,Microsoft Equation 3.0! vEquation Equation.30,Microsoft Equation 3.0/ 0DTimes New RomanLlv 0vDTahomaew RomanLlv 0v" DWingdingsRomanLlv 0v0De0}fԚingsRomanLlv 0v@DArialngsRomanLlv 0v"PDChicagosRomanLlv 0v`DCourier NewmanLlv 0v1 B.  @n?" dd@  @@``   \"DUDHA% /089.RJ($*:)4; * 0L I)*'    ('  ,  E,*@* !/  $&%: `r$߿ߝXoifr$g\Oy Ekii2$\X&.E*j$$$2$ss=IC8:I2$ӓ)w7H_Mz <AA@2 @8Bsrʚ;%9ʚ;g4KdKdte0v 0tppp@ <4!d!d\vk 0(l<4dddd\vk 0(l <4BdBd\vl 0g4(d(dؤ0v 0[p@ ppP___PPT10De0}fԚ New Romanu 0uDTimes New Romanu 0u (@___PPT9"nu=!BWk@~PNG  IHDRF} PLTE3:tRNS@f cmPPJCmp0712Om9IDATc``b $<&40(Zжj˂AtM iIENDB`@(?B+ .cpeg323-05F\Topic3c-323O =%Topic 3c Integer Multiply and Divide @& aeXa & 8Introduction to Computer Systems Engineering (CPEG 323)6-2 9a 9 AUnsigned Integer Multiply`  Paper and pencil example: Multiplicand 1000 Multiplier * 1001 1000 0000 0000 1000 Product 01001000`a eea ea a+aa aaaea&i  D B Observation `  Im bits * n bits = m+n bit product Stage i accumulates A * 2 i if Bi == 1TJ=bjbjb J CHow does it work?`  at each stage shift A left ( x 2) use next bit of B to determine whether to add in shifted multiplicand accumulate 2n bit partial product at each stageb  RSimple Mathematics`  a2i*A: shift A left for i times. It is clear that multiply is composed of iterative Shift and addPSbjQbb b DMultiply hardware (V1)`   EMultiply Algorithm (V1)b$   F"Observations on Multiply Version 1##b( # 1/2 bits in multiplicand always 0 => 64-bit adder is wasted 0 s inserted in right of of multiplicand as shifted => least significant bits of product never changed once formed How many cycles it takes to multiply two 32-bit numbers ? &`=d  (X C Instead of shifting multiplicand to left, shift product to right? .DBdB GMultiply hardware (V2)`   HMultiply Algorithm V2b$   I What s going on?`  bMultiplicand stay s still and product moves right22b 2 L"Observations on Multiply Version 2##b( # yProduct register wastes space that exactly matches size of multiplier => combine Multiplier register and Product registerzzb( z MMultiply hardware V3`   NMultiply Algorithm V3b$   OSign Multiplicationb(  Easiest solution is to make both positive remember whether to complement product when done That is: calculate the sign of the product, convert the operands into positive numbers, leave out the sign bit, run for 31 steps, then fix the result. `I`I`` `   'W#Faster Algorithms or Multiplication$$b$ $  Booth s Algorithm multiply signed numbers using same hardware as before and save cycles can handle multiple bits at a time Using an array of adders Observation: whether to add or not add a particular shifted multiplicand  a decision can be made all in parallel ..LZiZZ`i``  "TDivide: Paper & Pencil`  t 1001 Quotient Divisor 1000 1001010 Dividend  1000 10 101 1010  1000 10 Remainder Dividend = Quotient * Divisor + Remainder cgcgcg (cgg c gb*c   #UHow to do Division ?`   )YDivision process B step 0: Remainder is initialized with the divident step 1: The divisor is shift to the right at each step step 2: And we test if remainder  divisor < 0 ? If so => continue to shift divisor to the right, otherwise set a bit in the quotient R, repeat step 1 with the partial remainder""+/4     $%P-  0` @EoOV` @Eff؂o` MMMwww` 33f3Ƨgzf` 3ffE` JH3f̙ff` 33̙fRP` =bf>?" dd@,?wnd@ n< w_@nA``< n?" dd@   @@``PP   @ ` ` p>> @(8(CC '(   !T    "b   # " \    "B   HDA "B   HDA "B   HDA "@@B   HDA "B   HDA "B   HDA "B   HDA "@@B   HDA "B   HDA "B   HDA "B   HDA "@@B   HDA "  B   HDA "  B   HDA "  B   HDA "@ @ B   HDA "  B   HDA "  B   HDA "  B   HDA "@@B   HDA "B   HDA "B   HDA "z\    "B   HDA "B   HDA "B   HDA "@@B   HDA "B   HDA "B !  HDA "B "  HDA "@@B #  HDA "B $  HDA "B %  HDA "B &  HDA "@@B '  HDA " B (  HDA " B )  HDA " B *  HDA "@ @ B +  HDA " B ,  HDA " B -  HDA " B .  HDA "@@B /  HDA "B 0  HDA "B 1  HDA "B 2  HDA "@@B 3  HDA "B 4  HDA "B 5  HDA "B 6  HDA "@@B 7  HDA "B 8  HDA " 9  # t?A?60%"@`tB :  6D"tb `  ; # "|i4 tB < B 6D"`  tB =  6D"PP 2 > B  BCENGGHʲI[TQ zR(VzR(V[T`TzR(V[T`T" ? 6 "  X Click to edit Master title style!!  @   Rectangle: Click to edit Master text styles Second level Third level Fourth level Fifth level"0  RClick to edit Master text styles Second level Third level Fourth level Fifth level!    S  A 6݈ "``  h*c    B 6 "`   j*c    C 6  "`   j*c   H  0޽h ?>  @Eff؂o___PPT92p22 Blueprint*  0 **0GG*(  B$T   "6b  # "  T??"@`\   "B  HDA "B  HDA "B  HDA "@@B   HDA "B   HDA "B   HDA "B   HDA "@@B   HDA "B  HDA "B  HDA "B  HDA "@@B  HDA "  B  HDA "  B  HDA "  B  HDA "@ @ B  HDA "  B  HDA "  B  HDA "  B  HDA "@@B  HDA "B  HDA "B  HDA "B  HDA "B  HDA "B  HDA "@@B  HDA "B   HDA "B ! HDA "B " HDA "@@B # HDA "B $ HDA "B % HDA "B & HDA "@@B ' HDA " B ( HDA " B ) HDA " B * HDA "@ @ B + HDA " B , HDA " B - HDA " B . HDA "@@B / HDA "B 0 HDA "B 1 HDA "B 2 HDA "@@B 3 HDA "B 4 HDA "B 5 HDA "B 6 HDA "@@B 7 HDA "B 8 HDA "tB 9 6D"$\ /c3  : "/c3 B ; 6D"/3 ,$D  0tB < 6D" tB = 6D"c2 >B  ZBCENGGHʲI[TQ zR(VzR(V[T`TzR(V[T`T"]Ft\  ? "tB @ 6D"r r tB AB 6D"442 B  ZBCENGGHʲI[TQ zR(VzR(V[T`TzR(V[T`T"   C 6ܰ  "Pp    X Click to edit Master title style!!  D   Rectangle: Click to edit Master text styles Second level Third level Fourth level Fifth level"%p0u    [#Click to edit Master subtitle style$$  E 6`  "``   h*c    F 6  "`    j*c    G 6`  "`    j*c   H  0޽h ?/ >B @Eff؂of 0 $v(  $ $ 0\ P    j*c    $ 0\    \ l*c   d $ c $ ?  \ $ 0D\  @ \ RClick to edit Master text styles Second level Third level Fourth level Fifth level!    S  $ 6\ `P  \ j*c    $ 6\ `  \ l*c   H $ 0޽h ? ̙3380___PPT10.#мy 0  0(  x  c $ CX@ (   x  c $ DpP?    H  0޽h ? ̙33y___PPT10Y+D='  = @B +=  0 d\@ (   r   S ?    R   s *   3 rW 8c 8c1 ?@ [P  .5 88XH   0޽h ? @Eff؂oy___PPT10Y+D='  = @B +G  0L0 FFPt`F(  t t  Z> 8c 8c1 ?? 0     t  Zӡ 8c 8c1 ?@ 9   $88XDF   t {lY t  `Tաxaxa1?0~8 dB02 dl  n N  p t  p~N fp t fp t  `ڡxaxa1?fU \A0* `h  l  t <8c?hTB  t c $8c?p`TB  t c $8c?` `~N  p  t  p  t  `xaxa1?   \A1* `h  l t <8c?( hTB t c $8c?p`TB t c $8c?  ~N g p  t g p  t  `xaxa1?g V  \A2* `h  l t <8c? h TB t c $8c? p `TB t c $8c?` ` ~N  p  t  p  t  ` xaxa1?   \A3* `h  l t <8c?( h TB t c $8c? p `TB t c $8c?  `B tB 08c? TB tB c $8c?` P TB t c $8c?` ` TB t c $8c?  TB t c $8c?` ` TB  t c $8c?  ZB !t s *8c?`` n N 7h "t 7h~N  h #t  h $t  `xaxa1?   \A0* `h  l %t <8c? hXTB &t c $8c?  TB 't c $8c? ` ~N 7   (t 7   )t  `xaxa1?7 &  \A1* `h  l *t <8c?x  XTB +t c $8c?` ` TB ,t c $8c?0 `0 ~N  h  -t  h  .t  `h xaxa1?   \A2* `h  l /t <8c? h XTB 0t c $8c?  TB 1t c $8c? ` ~N 7  2t 7  3t  `Fxaxa1?7&  \A3* `h  l 4t <8c?x XTB 5t c $8c?` ` TB 6t c $8c?0 `0 `B 7tB 08c?pTB 8tB c $8c?`TB 9t c $8c?TB :t c $8c?0 0 TB ;t c $8c?  TB t  ~N    ?t    @t  `Fxaxa1? ! ) \A0* `h  l At <8c?H  TB Bt c $8c?0 0 TB Ct c $8c?  ~N  8  Dt  8  Et  ` Fxaxa1? !v ) \A1* `h  l Ft <8c? 8 TB Gt c $8c?  TB Ht c $8c?  ~N   It   Jt  `$Fxaxa1?!) \A2* `h  l Kt <8c?H TB Lt c $8c?0 0 TB Mt c $8c?  ~N 8  Nt 8  Ot  `Fxaxa1?!v) \A3* `h  l Pt <8c?8TB Qt c $8c?TB Rt c $8c? `B StB 08c? TB TtB c $8c? TB Ut c $8c? 0 TB Vt c $8c? 0 TB Wt c $8c? 0 TB Xt c $8c? 0 ZB Yt s *8c? n N 0  @  Zt 0  @ ~N W 0  @  [t W 0  @  \t  ` Fxaxa1?W a F i  \A0* `h  l ]t <8c? (  TB ^t c $8c? 0 TB _t c $8c?P P @ ~N 0 @  `t 0 @  at  `\&Fxaxa1?a i  \A1* `h  l bt <8c?( TB ct c $8c? 0 TB dt c $8c? @ ~N W0 @  et W0 @  ft  `+Fxaxa1?Wa Fi  \A2* `h  l gt <8c?(  TB ht c $8c?0  TB it c $8c?P P@ ~N 0 @  jt 0 @  kt  `x1Fxaxa1?a i  \A3* `h  l lt <8c?(  TB mt c $8c?0  TB nt c $8c? @ `B otB 08c? P P TB ptB c $8c?P @@ ZB qt s *8c?P@ P ZB rt s *8c?@  ZB st s *8c?Pp Pq ZB tt s *8c?@  ZB ut s *8c?P @ P  vt  `8Fxaxa1?A~I dB12 dl   wt  `T>Fxaxa1? dB22 dl   xt  `BFxaxa1?   dB32 dl   yt  `GFxaxa1?   \P0* `h   zt  `PMFxaxa1?G %  \P1* `h   {t  `4RFxaxa1? u  \P2* `h   |t  `VFxaxa1?  \P3* `h   }t  `[Fxaxa1?g E  \P4* `h   ~t  `_Fxaxa1?   \P5* `h   t  `cFxaxa1?7   \P6* `h   t  `dhFxaxa1? f  \P7* `h  ZB t s *8c?P@ P  t  `lFxaxa1? E  O0 d   t  `qFxaxa1?'   O0 d   t  `puFxaxa1? u O0 d   t  `LyFxaxa1?' O0 d  H t 0޽h ? X(=^y___PPT10Y+D='  = @B +LS  0L0 [RSR`xQ(  x x  ZPF 8c 8c1 ??   F  x  ZF 8c 8c1 ?@ z+ F $88X#P8 c{  xV  x  fFxaxa1?Ui dB02 dl  t T s  x#  n~N F x F x  `hFxaxa1?F1d \A0* `h  l x <8c?VTB  x c $8c?JJTB  x c $8c?!^!~N  v  x  v  x  `Fxaxa1? 1 \A1* `h  l  x <8c?@ vVTB x c $8c?TB x c $8c? ^ ~N  0  x  0  x  `Fxaxa1? 1  \A2* `h  l x <8c? 0 VTB x c $8c?  TB x c $8c? ^ ~N s   x s   x  `xFxaxa1?s 1  \A3* `h  l x <8c?  VTB x c $8c?w w TB x c $8c?O ^O fB xB 68c?KfKZB xB s *8c?d / ZB x s *8c?d d (ZB x s *8c?  (ZB x s *8c?(ZB x s *8c?66(`B  x 08c?|| t T  Ma !x# _ (~N  Ma "x  Ma #x  `PFxaxa1?   \A0* `h  l $x <8c? MTB %x c $8c?  TB &x c $8c?  a~N   a 'x   a (x  `įFxaxa1?   \A1* `h  l )x <8c?  TB *x c $8c?  TB +x c $8c?l l a~N J  a ,x J  a -x  `Fxaxa1?J h  \A2* `h  l .x <8c?  TB /x c $8c?O O TB 0x c $8c?& & a~N  { a 1x  { a 2x  `Fxaxa1? "  \A3* `h  l 3x <8c?E { TB 4x c $8c?  TB 5x c $8c?  afB 6xB 68c?fZB 7xB s *8c? s ZB 8x s *8c?  ZB 9x s *8c?; ; ZB :x s *8c?  ZB ;x s *8c?`B x g   ?x  `Fxaxa1?g  x \A0* `h  l @x <8c? F TB Ax c $8c?l l >TB Bx c $8c?C C ~N !   Cx !   Dx  `Fxaxa1?! ? x \A1* `h  l Ex <8c?b F TB Fx c $8c?& & >TB Gx c $8c?  ~N R  Hx R  Ix  `Fxaxa1? x \A2* `h  l Jx <8c? FR TB Kx c $8c?  >TB Lx c $8c?  ~N   Mx   Nx  `Fxaxa1?x \A3* `h  l Ox <8c?F TB Px c $8c?>TB Qx c $8c?qqfB RxB 68c?fZB SxB s *8c? , Q v ZB Tx s *8c? v ZB Ux s *8c? v ZB Vx s *8c? v  ZB Wx s *8c?X v X `B Xx 08c?v  t T &@o  Yx#  0 ~N  @o  Zx  @o  [x  `|Fxaxa1? ^ 2 \A0* `h  l \x <8c?9 o TB ]x c $8c? @ TB ^x c $8c?  ~N @)  _x @)  `x  `Fxaxa1?^ 2 \A1* `h  l ax <8c?) TB bx c $8c? @ TB cx c $8c?  ~N l@ dx l@ ex  `Fxaxa1?l^2 \A2* `h  l fx <8c?TB gx c $8c?q@qTB hx c $8c?HH~N &@ ix &@ jx  `Fxaxa1?&^E2 \A3* `h  l kx <8c?gTB lx c $8c?+@+TB mx c $8c?fB nxB 68c?x fx ZB oxB s *8c? 0 `B px 08c?0  `B qx 08c?] 0 ] `B rx 08c? T U `B sx 08c? 0 `B tx 08c?/ 0 /  ux  fSxaxa1?Uic dB12 dl   vx  fSxaxa1?~nC  dB22 dl   wx  fL Sxaxa1?~   dB32 dl   xx  f\Sxaxa1?s &H  \P0* `h   yx  f Sxaxa1?s H  \P1* `h   zx  fSxaxa1?=s GH  \P2* `h   {x  fLSxaxa1? s H  \P3* `h   |x  f!Sxaxa1? s H  \P4* `h   }x  f,&Sxaxa1?A s L H  \P5* `h   ~x  f*Sxaxa1?s H  \P6* `h   x  f /Sxaxa1?cs mH  \P7* `h  `B x 08c? 0  x  fT3Sxaxa1?q . O0 d   x  f<8Sxaxa1?t O0 d   x  f x  Z 64-bit ALU  f  XB | 08c?Z XB | 08c?D |  fXSxaxa1?s  X Shift Left  d   |  fSxaxa1?^ :2|  Y Shift Right  d   |  fSxaxa1?{  SWrite d  p" | HG(8c?k W`  |  fHSxaxa1? q %  WControl  f   |  fPSxaxa1?  W32 bits  f   |  fSxaxa1? " O W64 bits  f   |  f4Sxaxa1?   W64 bits  f   | s BCDEF3f8c? @g`Hu  | s BCvDEF3f8c?u @@ e  | s BvCDE F3f8c?uu@@ n n  | s BCDEF8c?@d @ e  | s BC!DE F(8c?  j ` @  | s BCDEF8c?@   | s BCVDEF 8c?+UU    @   | s BClDEF8c?k@DKLXB "|@ 01?  &| <S0  _Note: The multiplicand R, Product R and ALU are all 64-bits, while the Multilier R is 32-bits.``H H | 0޽h ? X(=^y___PPT10Y+D='  = @B +q  0L0 x'+(     ZȺS 8c 8c1 ?? 2.?   S 8 ~A +Sf  6?a     fSxaxa8c?"   }-3. Shift the Multiplier register right 1 bit. . .f . l  <8c?\/ 8 r"  BG$8c? vD    fHSxaxa8c?D I A TDone  f      fxSxaxa8c?   SYes  f  f   68c?{ f     `Sxaxa8c?< 4  ~.2. Shift the Multiplicand register left 1 bit. / /f / l   <8c?7 1     ftSxaxa8c? ~  dNo: < 32 repetitions  f  f  68c?; I nT  ;; # ]  s   `Sxaxa8c?  R1.  f  IN  ;;   ;;   `Sxaxa8c?{ VTest" f     `Sxaxa8c? z;; ] Multiplier0"   f     f8Sxaxa8c?* _Multiplier0 = 0  f     fSxaxa8c?  ] Multiplier0=1  f  f  68c?Q %;   f,Sxaxa8c?  M1a. Add multiplicand to product & place the result in Product register N Nf N l  <8c?  s BC0DEF?/ @ f  68c? F    f@Sxaxa8c?  c32nd repetition?" f  r"  BG$8c? j   f`Sxaxa8c?S   UStart  f  rB  B8c? xcrB  B8c?~    s B6C6DE F8c?55@U  ! s B CDEF8c?   @kw F  " s BkCDEF8c?jj @  <  # s BCDEF8c?@ %   $ s BCDEF8c?@: 2 ;  % s BCDEF8c?@% & s & s BsC DEF8c? s s @ y  ' s BC DEF8c? @ p |H  0޽h ? X(=^y___PPT10Y+D='  = @B +  0L0 $(     ZS 8c 8c1 ?? 1  S    ZM 8c 8c1 ?@  S $88XH  0޽h ? X(=^y___PPT10Y+D='  = @B +}  0 X$(  Xr X S  M?   M r X S d M@ 0 M H X 0޽h ? @Eff؂o___PPT10i.}+D='  = @B +  0L0  D(     ZxM 8c 8c1 ?? _$%  M X # 01? /& ^ $ 68c? 7-  %  `Mxaxa1?   WProduct  f  X & 01?K^ ' 68c? (  `>/ xaxa1?% Z Multiplier  f  X ) 08c?9/& 1^ * 68c?A7- 7 +  ` Mxaxa1?i ] \ Multiplicand  f   ,  `D$Mxaxa1?3> x  Z 32-bit ALU  f  RB . s *8c?D 0  `)Mxaxa1?^ :2|  Y Shift Right  d   1  `'Mxaxa1? $  Y Shift right  d  j" 2 BG(8c?k  W`  3  `h1Mxaxa1? q %  WControl  f   4  `@0Mxaxa1?  W32 bits  f   5  `t,Mxaxa1? " O W32 bits  f   6  `P=Mxaxa1?   W64 bits  f   7 s BCDEF3f8c? @g`Hu  9 s BvCDE F3f8c?uu@@ n  : s BCDEF8c?@ @  ; s BC!DE F(8c?  j ` @  < s BCDEF8c?@   = s BCVDEF 8c?+UU    @   > s BClDEF8c?k@DKLRB ?@ s *1? ^B @ 6D8c  RB A s *8c?t  t  B  `XCMxaxa1?S q  SWrite d   C s BCDEF8c?@  . H  0޽h ? X(=^y___PPT10Y+D='  = @B +t  0L0 {'+(     ZKM 8c 8c1 ?? ! *  M X  0? 9     `OMxaxa8c? ]  {-3. Shift the Multiplier register right 1 bit.. .d . ^  68c? k d"  <G$8c? K    `OMxaxa8c?@   TDone  f      `TMxaxa8c?)- ! cYes: 32 repetitions  f  X   08c?(  ,    `XMxaxa8c?   *2. Shift the Product register right 1 bit.B+  ddd + ^   68c? v     `^Mxaxa8c?  dNo: < 32 repetitions  f  X  08c?T F | |C  RP k)   `bMxaxa8c?  P1. d  RN | |C  | |C   `hMxaxa8c?MA a Test  d     `\iMxaxa8c?| y|C [ Multiplier0   d     `kMxaxa8c?jya [ Multiplier0=0 d     `,oMxaxa8c?c{  [ Multiplier0=1 d  8  +wZ`  08c?" m    `LxMxaxa8c? i1a. Add multiplicand to the left half of product & place the result in the left half of Product registerxj dddddd j l  <8c?  c BC0DEF?/ @]  X  08c?E _  ZPMxaxa8c?d Y 0 c32nd repetition?" f  d"  <G$8c?R )   `ԄMxaxa8c?7$ 6U SStart d  dB  <8c? 'dB   <8c?e a  ! c B6C6DE F8c?55@hn  " c B CDEF8c?   @  # s BCDEF8c? @h   $ c BCDEF8c?@ D E  % c BCDEF8c?@ & ' n  & c BCDEF8c?@g, -  ' c BC DEF8c?   @ ~ ( c BCDEF8c?@(  H  0޽h ? X(=^y___PPT10Y+D='  = @B +R  0L0 QQ >Q(     ZT/ 8c 8c1 ?? _I  M    ZM 8c 8c1 ?@ J /  $88XO8  <    `Mxaxa1?`l hB06 fn  `B B 08c? ZB  s *8c?  `B B 08c? ZB  s *8c?p p ZB   s *8c?  ZB   s *8c?pP pQ ZB   s *8c? ZB   s *8c?p p     `Mxaxa1?0< hB16 fn     `,Mxaxa1?  hB26 fn     `ȧMxaxa1?   hB36 fn     `4?/ xaxa1?  `P0. bj     `Mxaxa1?g F `P1. bj     `Mxaxa1?  `P2. bj     `ԹMxaxa1?  `P3. bj     `Mxaxa1? g  `P4. bj     `0Mxaxa1?  `P5. bj     `Mxaxa1?W 6 `P6. bj     `Mxaxa1?  `P7. bj  ZB  s *8c?p p    `Mxaxa1?  Q0  f     `Mxaxa1?1 Q0  f     `Mxaxa1?= Q0  f     `Mxaxa1? 2  Q0  f  TB  c $8c? p @ N x @  x @~ N Gx   Gx N x    x  !  `Mxaxa1?  `A0. bj  l " <8c? x HTB # c $8c?  TB $ c $8c? P N G % G &  `Mxaxa1?G6 `A1. bj  l ' <8c?HTB ( c $8c?ppTB ) c $8c?@P@N x * x +  `|Mxaxa1? `A2. bj  l , <8c?xHTB - c $8c?TB . c $8c?PN G / G 0  `Mxaxa1?G5 `A3. bj  l 1 <8c?HTB 2 c $8c?ppTB 3 c $8c?@P@TB 4B c $8c? TB 5 c $8c?TB 6 c $8c?@ @TB 7 c $8c?p@TB 8 c $8c?@@TB 9 c $8c?p@ N @x  : @x ~ N G@x P ; G@x PN @x P < @x P =  `tMxaxa1?o { `A0. bj  l > <8c? 8x TB ? c $8c? @ 0TB @ c $8c?  PN G@P A G@P B  `Ixaxa1?Go6{ `A1. bj  l C <8c?8TB D c $8c?p@p0TB E c $8c?@@PN @xP F @xP G  `Ixaxa1?o{ `A2. bj  l H <8c?8xTB I c $8c?@0TB J c $8c?PN G@P K G@P L  ` Ixaxa1?Go5{ `A3. bj  l M <8c?8TB N c $8c?p@p0TB O c $8c?@@PTB PB c $8c? TB Q c $8c? PTB R c $8c?@P TB S c $8c?PpTB T c $8c?@PTB U c $8c?PpTB V c $8c? Pp TB W c $8c?p  TB X c $8c?p @p `B YB 08c? 0 0  N x  Z x ~ N Gx  [ Gx N x  \ x  ]  `lIxaxa1?   `A0. bj  l ^ <8c? x TB _ c $8c?  TB ` c $8c? N G  a G  b  `0Ixaxa1?G6  `A1. bj  l c <8c? TB d c $8c?ppTB e c $8c?@ @ N x  f x  g  `Ixaxa1?  `A2. bj  l h <8c?x TB i c $8c?TB j c $8c?  N G  k G  l  `L%Ixaxa1?G5  `A3. bj  l m <8c? TB n c $8c?ppTB o c $8c?@ @ TB pB c $8c?`  TB q c $8c?  TB r c $8c?@ TB s c $8c? p TB t c $8c?@  TB u c $8c? p TB v c $8c? p TB w c $8c?p P TB x c $8c?p p TB y c $8c?  TB z c $8c?  TB { c $8c? p `B |B 08c?   N  x  }  x ~ N G x  ~ G x N  x    x    `/Ixaxa1?  `A0. bj  l  <8c? x x ( TB  c $8c? p TB  c $8c? 0 N G    G     `4Ixaxa1?G 6  `A1. bj  l  <8c?x ( TB  c $8c?p pp TB  c $8c?@0 @ N  x    x    `,:Ixaxa1?   `A2. bj  l  <8c?x x( TB  c $8c? p TB  c $8c?0  N G    G     `?Ixaxa1?G 5  `A3. bj  l  <8c?x ( TB  c $8c?p pp TB  c $8c?@0 @ TB B c $8c? ` TB  c $8c?`  TB  c $8c?@ TB  c $8c? p TB  c $8c?@  TB  c $8c? p TB  c $8c? p TB  c $8c?p ` TB  c $8c?p p ` TB  c $8c? 0  TB  c $8c? P 0 TB  c $8c?0  TB  c $8c?P 0 ZB  s *8c?  ZB  s *8c? H  0޽h ? X(=^y___PPT10Y+D='  = @B +  0L0 *"0(     ZJI 8c 8c1 ?? 6  I    `xUI 8c 8c1 ?@    I $88XH  0޽h ? X(=^y___PPT10Y+D='  = @B +  0L0 @?(     Z^I 8c 8c1 ?? M  I X  01? /& ^  68c? 7-     ``Ixaxa1?   WProduct  f  X ! 01?KX $ 08c?9/& 1^ % 68c?A7- 7 &  `eIxaxa1?i ] \ Multiplicand  f   '  `$kIxaxa1?3> x  Z 32-bit ALU  f   +  `LoIxaxa1? $  Y Shift right  d  j" , BG(8c?k  W`  -  `(nIxaxa1? q %  WControl  f   /  `rIxaxa1? " O W32 bits  f   0  `yIxaxa1?   W64 bits  f   3 s BvCDE F3f8c?uu@@ n  4 s BCDEF8c?@ @  5 s BC!DE F(8c?  j ` @  6 s BCDEF8c?@   7 s BCVDEF 8c?+UU    @   8 s BClDEF8c?k@DKL^B : 6D8c oo RB ; s *8c?t  t  <  `dIxaxa1?S q  SWrite d   = s BCDEF8c?@  .  >  `Ixaxa1? GX  V (Multiplier)  `   ? C BCzDEFA8czz @ & H  0޽h ? X(=^y___PPT10Y+D='  = @B +   0L0 P%)(     ZI 8c 8c1 ?? .g   I X  0?0 b  d"  <G$8c? R m   `ԎIxaxa8c?q% B  RDone d     `,Ixaxa8c?4  cYes: 32 repetitions  f  X  08c?J K      `pIxaxa8c?/ M  t*2. Shift the Product register right 1 bit.+ +` + ^   68c? c     `PIxaxa8c?0 ( dNo: < 32 repetitions  f  X   08c? a=F  0    S1   `0Ixaxa8c?  P1. d  BN  0   0   `Ixaxa8c?^0. TTest  d     `Ixaxa8c? z0 XProduct0   d     `tIxaxa8c?z l Product0 = 00 dd     `PIxaxa8c?*  l Product0 = 10 dd  {8 V  (' `  08c?+ W   fxIxaxa8c?Z  o1a. Add multiplicand to the left half of product & place the result in the left half of Product registerp p` p l  <8c?V   c BC0DEF?/ @ X  08c? v 0  ZIxaxa8c? _ S| c32nd repetition?" f  d"  <G$8c?Q {]   `Ixaxa8c?ks  SStart d  dB  <8c?b dB  <8c?   c B6C6DE F8c?55@    c B CDEF8c?   @    ! s BOCDEF8c?OO @$s  "@ c BCDEF8c?@W  +  # c BCDEF8c?@3 4  $ s BCT DEF8c?_Q T  @n h  % c BCDEF8c?@e [# ) <I vz 9,$  0 ONote: the multiplier is initially Placed in the right of the Product RegisterPPH  0޽h ? X(=^xp___PPT10P+/?)D'  = @B D' u= @BA?%,( < +O%,( < +D' =%(D' =%(D>' =A@BBBB0B%(D' =1:Bvisible*o3>+B#style.visibility<*)%(D' =-m6Bbox(in)*<3<*)+8+0+)0 +   0L0 $`(     ZI 8c 8c1 ?? ?      ZDI 8c 8c1 ?@ E  I $88XH  0޽h ? X(=^y___PPT10Y+D='  = @B +}  0 T$(  Tr T S I?   I r T S I@ 0 I H T 0޽h ? @Eff؂o___PPT10i. b+D='  = @B +e  0L0 tl<(  < <  ZhI 8c 8c1 ?? I  I  <  ZZ 8c 8c1 ?@ ]k I $88XLB < c $8c?yyLB < c $8c?d LB < c $8c? LB < c $8c? G K H < 0޽h ? X(=^y___PPT10Y+D='  = @B +%  0L0 #%D(  D D  Za 8c 8c1 ?? V:   8    "D`n ` D 01? f D 68c?  D  `  xaxa1? %  W Remainder  d  ` D 01?q f D 68c?w   D  `Jxaxa1?R  VQuotient  d  `  D 08c? f  D 68c?"   D  `tMxaxa1?  ) UDivisor d    D  `Nxaxa1?, D )  X 64-bit ALU  d  ZB D s *8c?k) ZB D s *8c?"j" D  `Kxaxa1?  Y Shift Right  d   D  `oxaxa1?   X Shift Left  d   D  `\axaxa1?: S q  SWrite d  r" D BG(8c?d L A  D  `kxaxa1?   UControl d   D  `8kxaxa1? n  U32 bits d   D  `4mxaxa1?H  U64 bits d   D  `؜xaxa1?<  U64 bits d   D c BCDEF 8c? @ v<  D c BCvDEF 8c?u @ aF  D c BvCDE F 8c?uu@@ |  D c BCDEF 8c?@ E l F  D c BC!DE F(8c?  j ` @@+  D c BCDEF8c?@5 6  D c BCVDEF 8c?+UU    @p6  D c BClDEF8c?k@%  D c BCDE F8c?@88  ~ #D 0^ 1 How to do division here ? Note: Left of Divisor R is initialized with the divisor, Right of Remainder R is initialized with dividend, Quotient R is initialized with 0. >f d d2   $D 0l F@,$@  0 =Note: Dividend is NOT shifting, and Divisor is moving right!>>f2 > ) %D 0Ȣ >j x,$D  0 %Try to go over the example on P186 ? 2&%f2f2%  H D 0޽h ? X(=^U M ___PPT10- +ND '  = @B D' u= @BA?%,( < +O%,( < +D' =%(D' =%(D1' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*$D%(D' =-m6Bbox(in)*<3<*$DD1' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*$D>%(D' =-m6Bbox(in)*<3<*$D>D' =%(D' =%(D1' =4@BBBB%(D' =1:Bvisible*o3>+B#style.visibility<*%D%%(D' =-m6Bbox(in)*<3<*%D%+}  0 \$(  \r \ S 8 Z?   Z r \ S Z@ 0 Z H \ 0޽h ? @Eff؂o___PPT10i. >+D='  = @B +HD 0 (    `آ\xaxa1 ? E   @` p  01 ?t    \H  0޽h ? X(=^@ E 0  (    `Ȩ\xaxa1 ? E   8 M ier: 0011 M and: 0000 0010 P: 0000 0000 1a. 1=>P=P+Mcand M ier: 0011 Mcand: 0000 0010 P: 0000 0010 2. Shl Mcand M ier: 0011 Mcand: 0000 0100 P: 0000 0010 3. Shr M ier M ier: 0001 Mcand: 0000 0100 P: 0000 0010 1a. 1=>P=P+Mcand M ier: 0001 Mcand: 0000 0100 P: 0000 0110 2. Shl Mcand M ier: 0001 Mcand: 0000 1000 P: 0000 0110 3. Shr M ier M ier: 0000 Mcand: 0000 1000 P: 0000 0110 1. 0=>nop M ier: 0000 Mcand: 0000 1000 P: 0000 0110 2. Shl Mcand M ier: 0000 Mcand: 0001 0000 P: 0000 0110 3. Shr M ier M ier: 0000 Mcand: 0001 0000 P: 0000 0110 1. 0=>nop M ier: 0000 Mcand: 0001 0000 P: 0000 0110 2. Shl Mcand M ier: 0000 Mcand: 0010 0000 P: 0000 0110 3. Shr M ier M ier: 0000 Mcand: 0010 0000 P: 0000 0110N^` ```` `Q` ```` `S````` `S````` ``  p  01 ?t    \H  0޽h ? X(=^HF 0 (    `\xaxa1 ? E   @` p  01 ?t    \H  0޽h ? X(=^HG 0 (    `\xaxa1 ? E  \ @` p  01 ?t    \H  0޽h ? X(=^@ H 0  (    ` xaxa1 ? E  \ 8 M ier: 0011 Mcand: 0010 P: 0000 0000 1a. 1=>P=P+Mcand M ier: 0011 Mcand: 0010 P: 0010 0000 2. Shr P M ier: 0011 Mcand: 0010 P: 0001 0000 3. Shr M ier M ier: 0001 Mcand: 0010 P: 0001 0000 1a. 1=>P=P+Mcand M ier: 0001 Mcand: 0010 P: 0011 0000 2. Shr P M ier: 0001 Mcand: 0010 P: 0001 1000 3. Shr M ier M ier: 0000 Mcand: 0010 P: 0001 1000 1. 0=>nop M ier: 0000 Mcand: 0010 P: 0001 1000 2. Shr P M ier: 0000 Mcand: 0010 P: 0000 1100 3. Shr M ier M ier: 0000 Mcand: 0010 P: 0000 1100 1. 0=>nop M ier: 0000 Mcand: 0010 P: 0000 1100 2. Shr P M ier: 0000 Mcand: 0010 P: 0000 0110 3. Shr M ier M ier: 0000 Mcand: 0010 P: 0000 0110T````&````` `H````&````` `J``&````` `J``&````` ``  p  01 ?t    H  0޽h ? X(=^HL 0 (    ` xaxa1 ? E   @` p  01 ?t    H  0޽h ? X(=^HM 0 (    `\xaxa1 ? E   @` p  01 ?t    \H  0޽h ? X(=^N 0 a(    ` xaxa1 ? E   S Mcand: 0010 P: 0000 0011 1a. 1=>P=P+Mcand Mcand: 0010 P: 0010 0011 2. Shr P Mcand: 0010 P: 0001 0001 1a. 1=>P=P+Mcand Mcand: 0010 P: 0011 0001 2. Shr P Mcand: 0010 P: 0001 1000 1. 0=>nop Mcand: 0010 P: 0001 1000 2. Shr P Mcand: 0010 P: 0000 1100 1. 0=>nop Mcand: 0010 P: 0000 1100 2. Shr P Mcand: 0010 P: 0000 0110vT>````````#````````%``````%`````` Q p  01 ?t    H  0޽h ? X(=^HO 0 (    `4 xaxa1 ? E   @` p  01 ?t    H  0޽h ? X(=^HT 0 @@(  @ @ `(: xaxa1 ? E   @` p @ 01 ?t    H @ 0޽h ? X(=^HU 0 PH(  H H `? xaxa1 ? E   @` p H 01 ?t    H H 0޽h ? X(=^xVMhSAM&Z-Eу\P Պ=J+I1ҼM*x豂xA A=Igv'D<&ovfg{*T#TYPP, fMqT*ťj(F>a_le+ؕ)E@Za/xus߼{.#Mr ^O/Y 7ZB9? G n?RN'YK28aP?S'?ź̸-w DnE>| !="a&;,s*k8L&-ҩٌ=$R=20WW 3OjO~(ԕ#hOzгtZlI"$.%SK`,۵ʈ/蔿 6pAw_ih'cQD2T2Bl:Ot"_l1>6zPc WFAr0(!K%TH ^bE wfr%WjX(~%;)F7k*qI->o,TFxVKLAݿT@`xË 98y+Pb mn Moƨ7c"Ƌ jMxRZgv?KFIffwgf|Y~#Qh8n1ł\t&Ɋ3h ٮrh"C oi!s0JX1Y]t\WiWoW3r!XM3Rc?B Z:U OFlrVy3?bdP.R22o5Jv@'1mb]MTh,:&P4hi7jDyeAKl;k>٥z+ᇚ_p'Nh+Yt 1KKi/u1IGBª3ɳ\ۖf׍mV0Txخ ƘtSSsQIr4,o'"/U狝aB= qׅP56&!JLz>'(ዞ:PB;pH^e~<{b%fj2T?MپG΢U:// BRxVOQ-VQB$p0@Ë4@Rڅv&HzG FILq oď֙mUil}yo̼_w: p;dL ?8 !";t_oh |L`bTi+ؗa~_r!߶;޾3xS.2D$8sSQ(?GaXU}Sis4|'ʩU>H9ޜOt^dr#rr3+RXgz7ju61|j^iǟI=7ƒ&CnĴ>JcLWW+Ov)]`ՕC=伋LVp[,eG,%]b0I/k~j//Kqt mq9E`2d^K`ˊ?M2]肱c0ԷB=- zL~ğ'saǤ:ow[-HB\fh(˳R=;+pܹȳ}w.qlH?b|Cx\βY1cvqu|;l^-侀K O$D:#6%<*qc16EߧUAv 1~౨yl*aFEkfO:A)/v$>ucW'XaLa*i8D#K`:F77@igF'Ncp^T [JB:| |33x@*$!_~:~;pJ4|{7ETMlyr@`3|` }lz:Swrx@;^M<8Pjl5vxz@m֍02Ɣ "@=KB&v'0Y;uh)1Oh+'0H9 hp 0 P \ ht|(Lecture 6 Instruction Set ArchitecturesPGaoPC:\Program Files\Microsoft Office\Templates\Presentation Designs\Blueprint.potGuang R. Gao1071Microsoft PowerPoint@W@ EZ{@pMG7g  0  y--$xx--'--$:::--'-B( DD--$ --'-B( DD--$ --'-B( DD--$ --'-B( DD--$ --'-B( DD--$ --'-B( DD--$  --'-B( DD--$ $$%%%%%%%%$$--'-B( DD--$ ****++++****--'-B( DD--$ ///00000///--'-B( DD--$ 445555555544--'-B( DD--$ ::::;;;;::::--'-B( DD--$ ???@@@@@???--'-B( DD--$ DDEEEEEEEEDD--'-B( DD--$ JJJJKKKKJJJJ--'-B( DD--$ OOOPPPPPOOO--'-B( DD--$ TTUUUUUUUUTT--'-B( DD--$ ZZZZ[[[[ZZZZ--'-B( DD--$ ___`````___--'-B( DD--$ ddeeeeeeeedd--'-B( DD--$ jjjjkkkkjjjj--'-B( DD--$ ooopppppooo--'-B( DD--$ ttuuuuuuuutt--'-B( DD--$ xxxxx--'-B( DD--$ x x x x x --'-B( DD--$ xxxx--'-B( DD--$ xxxxx--'-B( DD--$ xxxxx--'-B( DD--$ x xxx --'-B( DD--$ %%x%x%x%x$x$%%%%%--'-B( DD--$ ++x+x*x*x*x***+++--'-B( DD--$ 00x0x/x/x//0000--'-B( DD--$ 55x5x5x5x4x455555--'-B( DD--$ ;;x;x:x:x:x:::;;;--'-B( DD--$ @@x@x?x?x??@@@@--'-B( DD--$ EExExExExDxDEEEEE--'-B( DD--$ KKxKxJxJxJxJJJKKK--'-B( DD--$ PPxPxOxOxOOPPPP--'-B( DD--$ UUxUxUxUxTxTUUUUU--'-B( DD--$ [[x[xZxZxZxZZZ[[[--'-B( DD--$ ``x`x_x_x__````--'-B( DD--$ eexexexexdxdeeeee--'-B( DD--$ kkxkxjxjxjxjjjkkk--'-B( DD--$ ppxpxoxoxoopppp--'-B( DD--$ uuxuxuxuxtxtuuuuu--'-B( DD--$ {{x{xzxzxzxzzz{{{--'-B( DD--$ xxxx--'-B( DD--$ xxxxx--'-B( DD--$ xxxxx--'-B( DD--$ xxxx--'-B( DD--$ xxxxx--'-B( DD--$ xxxxx--'o--%)--'o--%A--'o--%Y55--'o--%t --'o-- %     --'o--%)__--'o--%6h--'o-- %__``aaa``_^]]]--'@"Tahoma-. @E2 u 2005/10/5."System9-@"Tahoma-. @E2 uDcpeg323c.-@"Tahoma-. @E 2 uK-K.-@"Tahoma-. @E 2 uL05F.-@"Tahoma-. @E 2 uO\K.-@"Tahoma-. @E2 uPTopic3cc.-@"Tahoma-. @E 2 uV-K.-@"Tahoma-. @E 2 uW323.-@"Tahoma-. @E 2 u1K.-@"Arial-. ff2 $;Topic 3c.-@"Arial-. X02 0Integer Multiply and Divide .-@"Arial-. @E-2 C,Introduction to Computer d.-@"Arial-. @E$2 L3Systems Engineering.-@"Arial-. @E2 \C (CPEG 323).-Root EntrydO)p6PicturesCurrent User)SummaryInformation(Xx9      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWYZ[\]^_`abcdefghijklmnopqrsty s  Fonts UsedDesign TemplateEmbedded OLE Servers Slide Titles4 $, _ȟoNEoNE$_ȟ 0Guang R. GaoGuang R. Gao  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWYZ[\]^_`abcdefghijklmnopqrstvwxyz{|~Root EntrydO)PicturesCurrent User}SummaryInformation(Xx9PowerPoint Document(DocumentSummaryInformation8uRoot EntrydO)p\*PicturesCurrent User}SummaryInformation(Xx9 ՜.+,D՜.+,D    On-screen ShowUDel   Times New RomanTahoma Wingdings ¼wArialChicago Courier New BlueprintMicrosoft Equation 3.0&Topic 3c Integer Multiply and Divide Unsigned Integer Multiply ObservationHow does it work?Simple MathematicsMultiply hardware (V1)Multiply Algorithm (V1)#Observations on Multiply Version 1Slide 9Multiply hardware (V2)Multiply Algorithm V2Whats going on?#Observations on Multiply Version 2Multiply hardware V3Multiply Algorithm V3Sign Multiplication$Faster Algorithms or MultiplicationDivide: Paper & PencilHow to do Division ?Division process  Fonts UsedDesign TemplateEmbedded OLE Servers Slide Titles4 $, PowerPoint Document(DocumentSummaryInformation8