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

Slides:



Advertisements
Similar presentations
Lecture 11 Oct 12 Circuits for floating-point operations addition multiplication division (only sketchy)
Advertisements

HEXADECIMAL NUMBERS Code
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 2.
UNIVERSITY OF MASSACHUSETTS Dept
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Lecture 5.
1 CS 140 Lecture 14 Standard Combinational Modules Professor CK Cheng CSE Dept. UC San Diego Some slides from Harris and Harris.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 4.
VLSI Arithmetic. Multiplication A = a n-1 a n-2 … a 1 a 0 B = b n-1 b n-2 … b 1 b 0  eg)  Shift.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Lecture 3 Number System.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 10 Thursday 02/19/02.
מבנה המחשב – מבוא למחשבים ספרתיים Parallel Prefix Computation.
Copyright 2008 Koren ECE666/Koren Sample Mid-term 2.1 Israel Koren Spring 2008 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Digital.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 11 Cordic, Log, Square, Exponential Functions.
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 1.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 10 Floating Point Number Rounding, Polynomial.
Computer ArchitectureFall 2008 © August 25, CS 447 – Computer Architecture Lecture 3 Computer Arithmetic (1)
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 9.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2005 Lecture 1: Numbers.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 8: Division.
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 1: Introduction and Numbers.
COE 308: Computer Architecture (T041) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Winter 2004 Lecture 7.
1 Lecture 4: Arithmetic for Computers (Part 4) CS 447 Jason Bakos.
CSE20 Lecture 3 Number Systems: Negative Numbers 1.Sign and Magnitude Representation 2.1’s Complement Representation 3.2’s Complement Representation 1.
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
ECE 645 – Computer Arithmetic Lecture 10: Fast Dividers ECE 645—Computer Arithmetic 4/15/08.
Lecture 10 Fast Dividers.
ECE 645 – Computer Arithmetic Lecture 9: Basic Dividers ECE 645—Computer Arithmetic 4/1/08.
Lecture 12: Computer Arithmetic Today’s topic –Numerical representations –Addition / Subtraction –Multiplication / Division 1.
Data Representation – Binary Numbers
General Fixed Radix Number Systems Nonredundant Positive radix, ß n digits in digit set Vector:
Binary Arithmetic Stephen Boyd March 14, Two's Complement Most significant bit represents sign. 0 = positive 1 = negative Positive numbers behave.
Chapter 7 Arithmetic Operations and Circuits Binary Arithmetic Addition –When the sum exceeds 1, carry a 1 over to the next-more-significant column.
1 CS/COE0447 Computer Organization & Assembly Language Chapter 3.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
07/19/2005 Arithmetic / Logic Unit – ALU Design Presentation F CSE : Introduction to Computer Architecture Slides by Gojko Babić.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
CSE 241 Computer Organization Lecture # 9 Ch. 4 Computer Arithmetic Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering.
Reconfigurable Computing - Multipliers: Options in Circuit Design John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on.
Integer Conversion Between Decimal and Binary Bases Conversion of decimal to binary more complicated Task accomplished by –Repeated division of decimal.
Digital Kommunikationselektronik TNE027 Lecture 2 1 FA x n –1 c n c n1- y n1– s n1– FA x 1 c 2 y 1 s 1 c 1 x 0 y 0 s 0 c 0 MSB positionLSB position Ripple-Carry.
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
Division Harder Than Multiplication Because Quotient Digit Selection/Estimation Can Have Overflow Condition – Divide by Small Number OR even Worse – Divide.
Integer numerical data types. The integer data types The integer data types use the binary number system as encoding method There are a number of different.
Complexity 20-1 Complexity Andrei Bulatov Parallel Arithmetic.
Microprocessor Technique Binary codes. Lecture 2 1/47 Binary codes in microprocessor technique Integer arithmetic Fix-point arithmetic Floating-point.
IT253: Computer Organization
COE 308: Computer Architecture (T032) Dr. Marwan Abu-Amara Integer & Floating-Point Arithmetic (Appendix A, Computer Architecture: A Quantitative Approach,
CS/EE 3700 : Fundamentals of Digital System Design Chris J. Myers Lecture 5: Arithmetic Circuits Chapter 5 (minus 5.3.4)
Addition, Subtraction, Logic Operations and ALU Design
CSE 246: Computer Arithmetic Algorithms and Hardware Design Instructor: Prof. Chung-Kuan Cheng Fall 2006 Lecture 7 Division.
ECE 171 Digital Circuits Chapter 2 Binary Arithmetic Herbert G. Mayer, PSU Status 1/14/2016 Copied with Permission from prof. Mark PSU ECE.
Computer Architecture Lecture 11 Arithmetic Ralph Grishman Oct NYU.
CSE 8351 Computer Arithmetic Fall 2005 Instructors: Peter-Michael Seidel.
General Fixed Radix Number Systems Nonredundant Positive radix, ß n digits in digit set Vector:
Dr. ClincyLecture 2 Slide 1 CS Chapter 2 (1 of 5) Dr. Clincy Professor of CS Note: Do not study chapter 2’s appendix (the topics will be covered.
Floating Point Arithmetic – Part I
UNIVERSITY OF MASSACHUSETTS Dept
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
Unconventional Fixed-Radix Number Systems
Computer Organization and Design
CPU Design & Computer Arithmetic
UNIVERSITY OF MASSACHUSETTS Dept
CS/COE0447 Computer Organization & Assembly Language
CS/COE0447 Computer Organization & Assembly Language
Converting from Base b to Base c
CSE 575 Computer Arithmetic Spring 2003 Mary Jane Irwin (www. cse. psu
Presentation transcript:

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

CSE 2462 Topics: Midterm Radix-4 SRT Division Division by a Constant Division by a Repeated Multiplication

CSE 2463 Midterm II.RNS to Decimal conversion (2|3|4)RNS(7|6|5) = ?  1 = 4  2 = 5  3 = 3

CSE 2464 Midterm III.One ’ s Complement Adder Loop back carryout of FA7 to the carry in of FA0 FA7FA6FA5FA4FA3FA2FA1FA0  The Delay is 8.7 because the maximum carry propagation is once cycle

CSE 2465 Midterm IV.Prefix Adders I.Ripple-carry Adder

CSE 2466 Midterm IV.Prefix Adders I.Prefix Adder

CSE 2467 Project Update  Come in to speak briefly about the final project Status Update 4 or 5 – 6:30 p.m. Tuesday or Thursday

CSE 2468 Radix-4 SRT Division  4s j-1 = q j d + s j where q j is in [-2,2] and s j-1 is in [-hd,+hd] h is less than or equal to 2/3 Therefore, s j-1 is in [-2d/3, 2d/3] And, 4s j-1 is in [-8d/3, 8d/3]  s shifts to the left by 2 bits

CSE 2469 Radix-4 SRT Division d/3 q j =1 q j =0 q j =2  The overlap regions of q j denote a choice still allowing for recursion Anything about 8/3 goes against our assumption and is therefore the infeasible region 4s j-1 d

CSE Radix-4 SRT Division  The value of q j determines the range it governs  For example, q j = /3 = 5/3 1 – 2/3 = 1/3 The range is 1/3 to 5/3

CSE Division by a Constant  Multiplication is O(log n) but division is linear…much slower Try to convert division to multiplication  Property: Given an odd number d m such that d*m = 2 n – 1  Ex. d = 3, m = 53*5 = 2 4 – 1 d = 7, m =97*9 = 2 6 – 1 d = 11, m = * 93 = E

CSE Division by a Constant  1/d = m/(2 n – 1)  1/(1-r) = 1+r+r 2 +r 3 + … = (1+r)(1+r 2 )(1+r 3 )(1+r 4 ) …  Example z/7 = mz/(2 n -1) log(n/6) operations m 1 2 n 1-2 -n = 2n2n m (1+2 -n )(1+2 -2n )(1+2 -4n ) z = z ( )( )( )

CSE Division by a Repeated Multiplication  q = z/d = (z/d)*(x 0 /x 0 )*(x 1 /x 1 ) … *(x k-1 /x k-1 )  Let xi = 2-di d 1 = dx o = d(2-d) = 1-(1-d) 2 d i+1 = d i x i = d i (2-d i ) = 1-(1-d i ) 2 1-d i +1 = (1-d i ) 2 … quadratic convergence  For k-bit operands, we need 2m-1 multiplications m 2 ’ s complement m = ceiling(log 2 k) with log 2 m extra bits for precision