CSE 246: Computer Arithmetic Algorithms and Hardware Design - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

CSE 246: Computer Arithmetic Algorithms and Hardware Design

Description:

Come in to speak briefly about the final project. Status Update. 4 or 5 6:30 p.m. ... di 1 = dixi = di(2-di) = 1-(1-di)2. 1-di 1 = (1-di)2 ...quadratic convergence ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 14
Provided by: Ale8219
Learn more at: http://cseweb.ucsd.edu
Category:

less

Transcript and Presenter's Notes

Title: CSE 246: Computer Arithmetic Algorithms and Hardware Design


1
CSE 246 Computer Arithmetic Algorithms and
Hardware Design
Winter 2004 Lecture 8
  • Instructor
  • Prof. Chung-Kuan Cheng

2
Topics
  • Midterm
  • Radix-4 SRT Division
  • Division by a Constant
  • Division by a Repeated Multiplication

3
Midterm
  • RNS to Decimal conversion
  • (234)RNS(765) ?
  • ?1 4
  • ?2 5
  • ?3 3

4
Midterm
  1. Ones Complement Adder

FA7
FA6
FA5
FA4
FA3
FA2
FA1
FA0
Loop back carryout of FA7 to the carry in of FA0
  • The Delay is 8.7 because the maximum carry
    propagation is once cycle

5
Midterm
  • Prefix Adders
  • Ripple-carry Adder

6
Midterm
  • Prefix Adders
  • Prefix Adder

7
Project Update
  • Come in to speak briefly about the final project
  • Status Update
  • 4 or 5 630 p.m.
  • Tuesday or Thursday

8
Radix-4 SRT Division
  • 4sj-1 qjd sj where
  • qj is in -2,2 and sj-1 is in -hd,hd
  • h is less than or equal to 2/3
  • Therefore, sj-1 is in -2d/3, 2d/3
  • And, 4sj-1 is in -8d/3, 8d/3
  • s shifts to the left by 2 bits

9
Radix-4 SRT Division
4sj-1
11.0
Anything about 8/3 goes against our assumption
and is therefore the infeasible region
10.1
qj2
10.0
1.1
qj1
1.0
2d/3
0.1
0.0
qj0
d
.1
.101
.110
.111
1.00
2d/3
  • The overlap regions of qj denote a choice still
    allowing for recursion

10
Radix-4 SRT Division
  • The value of qj determines the range it governs
  • For example, qj 1
  • 1 2/3 5/3
  • 1 2/3 1/3
  • The range is 1/3 to 5/3

11
Division by a Constant
  • Multiplication is O(log n) but division is
    linearmuch slower
  • Try to convert division to multiplication
  • Property Given an odd number d m such that
    dm 2n 1
  • Ex.
  • d 3, m 5 35 24 1
  • d 7, m 9 79 26 1
  • d 11, m 93 11 93 210 - 1

E
12
Division by a Constant
  • 1/d m/(2n 1)
  • 1/(1-r) 1rr2r3 (1r)(1r2)(1r3)(1r4)
  • Example
  • z/7 mz/(2n-1)
  • log(n/6) operations

m 1
m

(12-n)(12-2n)(12-4n)
2n 1-2-n
2n
z 9
9z

(12-6)(12-12)(12-24)
26 1-2-6
26
13
Division by a Repeated Multiplication
  • q z/d (z/d)(x0/x0)(x1/x1)(xk-1/xk-1)
  • Let xi 2-di
  • d1 dxo d(2-d) 1-(1-d)2
  • di1 dixi di(2-di) 1-(1-di)2
  • 1-di1 (1-di)2 quadratic convergence
  • For k-bit operands, we need 2m-1 multiplications
  • m 2s complement
  • m ceiling(log2 k) with log2 m extra bits for
    precision
Write a Comment
User Comments (0)
About PowerShow.com