Computer Arithmetic: Algorithms and Hardware Designs

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 246: Computer Arithmetic  Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 6.1 Multiplication Arithmetic 
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 246 2 Topics: Karatsuba’s Method (1962) Toom’s Method (1963) Modular Method  FFT
Image of page 2
CSE 246 3 Karatsuba’s Method U=2 n U 1 +U 0 , V=2 n V 1 +V 0 UV= 2 2n U 1 V 1 +2 n (U 1 V 0 +U 0 V 1 )+U 0 V = (2 2n+ 2 n )U 1 V 1 +2 n (U 1 -U 0 )(V 0 -V 1 )+(2 n +1)U 0 V 0 T(2n)<= 3T(n)+cn T(2 k )<=c(3 k -2 k ) T(n)=T(2 lgn )<=c(3 lgn -2 lgn )<3cn lg3 lg3=1.585
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 246 4 Toom’s Method U=2 rn U r +…+2 n U 1 +U 0 V=2 rn V r +…+2 n V 1 +V 0 U(x)= x r U r +…+xU 1 +U 0 V(x)= x r V r +…+xV 1 +V 0 U(x)V(x)=W(x)= x 2r W 2r +…+xW 1 +W 0 Set 2r+1 equations: W(0)=U(0)V(0) W(1)=U(1)V(1) W(2r)=U(2r)V(2r)
Image of page 4
CSE 246 5 Toom’s Method T((r+1)n)<= (2r+1)T(n)+cn T(n)<=cn log r+1 (2r+1) <cn 1+log r+1 2 Theorem: Given e> 0, there exists a multiplication  algorithm such that the number of elementary  operation T(n) needed to multiply two n-bit  numbers satisfies for some constant c(e)  independent of n T(n)<c(e)n 1+e
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 246 6 Toom’s Method U=(4,13,2) 16 , V=(9,2,5) 16 U(x)=4x 2 +13x+2, V=9x 2 +2x+5 W(x)=U(x)V(x) W(0)=10, W(1)=304,W(2)=1980 W(3)=7084,W(4)=18526 W(x)= x 2r W 2r +…+xW 1 +W 0
Image of page 6
CSE 246 7 Toom’s Method W(x)= x 2r W 2r +…+xW 1 +W 0 Rewrite     W(x)= a 2r x 2r +…+a 1 x 1 +a 0 where x k =x(x-1)…(x-k+1) W(x+1)-W(x)=  2ra 2r x 2r-1 +(2r-1)a 2r-1 x 2r-2 …+a 1 (W(x+2)-W(x+1))-(W(x+1)-W(x))= 2r(2r-1)a 2r x 2r-2 +(2r-1)(2r-2)a 2r-1 x 2r-3 …+2a 2
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CSE 246 8 Toom’s Method W(*)= 10 , 304, 1980, 7084, 18526 W’(*)=
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern