# CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions.

## Presentation on theme: "CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions."— Presentation transcript:

CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions

Project  IEEE Computer Society Author Kit (≤5Pages) Introduction Statement of Problem Approaches Examples Experiments Conclusion  30 Minutes

Cordic Algorithms  Coordinate Rotations Digital Computer Rotate vector (x,y) to (x’,y’) α (x’,y’) (x,y)

          Cordic Algorithms

 Key: Given cos α, sin α, tan α we can derive Cordic Algorithms iαiαi 045 126.6 214 37.1 43.6 51.8 60.9 70.4 80.2 90.1

 Find  Cordic Algorithms (Example)

Cordic Algorithms        

Logarithms – Method 1  Find 

Logarithms – Method 1  I.  II.  III. A table of

Logarithms – Method 1 (Example)  Find ln(x), x = 1.625 1+0.5+0.125=1.625 1. 1 0 1 1.-1 _ -1 -1 0 -1 x 1 1 0 1 _ 0. 1 1 0 1 1.0 1 _ 0 1 1 0 1 x 0 1 1 0 1 _ 1.0 0 0 0 1

Logarithms – Method 1 (Example)  -ln x = (1.-1) + ln(1.01) + ln(1.0000-1) 1. 0 0 0 0 0 1 1. 0 0 0 0 0-1 1. 0 0 0 0 0 0 0 0 0 0

Logarithms – Method 2  Let define   Initially x<2, ie. y 0 =0  If 

Logarithms – Method 2 for i = 1 to l do x = x 2 if x ≥ 2 then y i = 1 x = x/2 else y i = 0

Logarithms – Method 2 (Example) x 2 1.1 1 x 1.1 1 1 1 1 + 1 1 1 __ 1 1 0 0 0 1 y 1 = 1 x 2 /2 1.1 0 0 0 1 x 1.1 0 0 0 1 1 1 0 0 0 1 + 1 1 0 0 0 1 _ 1 0.0 1 0 1 1 0 0 0 0 1 y 2 = 1  Find ln 2 (x), x = 1.11 (1.75)

Logarithms – Method 2 (Example) (x 2 /2) 2 /2 = 1.00101100001 y 3 = 0 ln 2 1.11 ≈ 0.110

Squarer x3 x2 x1 x0 X x3 x2 x1 x0 x3x0 x2x0 x1x0 x0x0 x3x1 x2x1 x1x1 x0x1 x3x2 x2x2 x1x2 x0x2 + x3x3 x2x3 x1x3 x0x3 _ x3x2 x3x1 x3x0 x2x0 x1x0 x0 x3 x2x1 x1 + x2 _

Exponentiation e x        

 I.  II.  min:  max:

Download ppt "CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions."

Similar presentations