let6.1-Multiplication Arithmetic

# Computer Arithmetic: Algorithms and Hardware Designs

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

CSE 246: Computer Arithmetic  Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 6.1 Multiplication Arithmetic

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

View Full Document
CSE 246 2 Topics: Karatsuba’s Method (1962) Toom’s Method (1963) Modular Method  FFT
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

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

View Full Document
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)
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

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

View Full Document
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
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

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

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

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern