Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation.

Similar presentations


Presentation on theme: "ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation."— Presentation transcript:

1 ECE 8053 Introduction to Computer Arithmetic (Website: http://www.ece.msstate.edu/classes/ece8053/fall_2002/) Course & Text Content: Part 1: Number Representation Part 2: Addition/Subtraction Part 3: Multiplication Part 4: Division Part 5: Real Arithmetic (Floating-Point) Part 6: Function Evaluation Part 7: Implementation Topics

2 Course Learning Objectives Computer Arithmetic students will be able to... 1. explain the relative merits of number systems used by arithmetic circuits including both fixed- and floating-point number systems 2. demonstrate the use of key acceleration algorithms and hardware for addition/subtraction, multiplication, and division, plus certain functions 3. distinguish between the relative theoretical merits of the different acceleration schemes

3 Course Learning Objectives (Continued) 4. identify the implementation limitations constraining the speed of acceleration schemes 5. evaluate, design, and optimize arithmetic circuits for low-power 6. evaluate, design, and optimize arithmetic circuits for precision

4 Course Learning Objectives (Continued) 7. design, simulate, and evaluate an arithmetic circuit using appropriate references including current journal and conference literature 8. write a paper compatible with journal format standards on an arithmetic design 9. make a professional presentation with strong technical content and audience interaction

5 Importance of Computer Arithmetic 1.7GHz Pentium has a clock cycle of 0.59 ns 1 integer addition < 0.59 ns in execution stage of P/L Assume a 4-bit adder – ripple carry, 0.2 ns gate delay STEP 1 1101 1110 11011 -Note: added from right to left. Why?

6 Ripple-carry Structure STEP 2 – Design a circuit z4z4 z3z3 z2z2 z1z1 z0z0 c4c4 c3c3 c3c3 c3c3 c 0 =0 x3x3 y3y3 x2x2 y2y2 x1x1 y1y1 x0x0 y0y0 – Each box is a full-adder – Implement it

7 Full Adder Implementation xy c in 00011110 0 1 0101 1010 xy c in 00011110 0 1 0010 0111

8 Adder Circuit Analysis STEP 3 – Analysis Critical Path is 3 gates 3  4=12 (12)(0.2ns)=2.4ns 2.4ns > 0.59ns Must Use Faster Adder!!!!

9 Roman Numeral System Symbolic Digits RULES: If symbol is repeated or lies to the right of another higher-valued symbol, value is additive XX=10+10=20 CXX=100+10+10=120 If symbol is repeated or lies to the left of a higher-valued symbol, value is subtractive XXC = - (10+10) + 100 = 80 XLVIII = -(10) + 50 + 5 + 3 = 48

10 Weighted Positional Number System Example: Arabic Number System (first used by Chinese)

11 Addition Paradigms right to left serial 1 147865 +30921 178786 right to left, parallel 147865 +30921 177786 001000 178786 random 461325 147865 +30921 177786 001000 178786

12 Binary Number System n-ordered sequence: each x i  {0,1} is a BInary digiT (BIT) magnitude of n is important sequence is a short-hand notation more precise definition is: This is a radix-polynomial form

13 Number System A Number System is defined if the following exist Example: The binary number system 1. 2. 3.Addition operator defined by addition table 4.Multiplication operator defined by multiplication table 1. A digit set 2.A radix or base value 3.An addition operation 4.A multiplication operation

14 Number System Observations Cardinality of digit set (2) is equal to radix value Addition operator XOR, Multiplication is AND How many integers exist? Mathematically, there are an infinite number,  In computer, finite due to register length smallest representable number largest representable number range of representable numbers [-inclusive; (-exclusive interval bounds When ALU produces a result >Xmax or <Xmin, incorrect result occurs ALU should produce an error signal

15 Example Assume 4-bit registers, unsigned binary numbers Answer in register is 0011 2 =3 10 Overflow

16 Machine Representations Most familiar number systems are: 1.nonredundant – every value is uniquely represented by a radix polynomial 2.weighted – sequence of weights determines the value of the n-tuple formed from the digit set 3.positional – w i depends only on position i 4.conventional number systems where ß is a constant. These are fixed-radix systems.

17 Example Since octal is fixed-radix and positional, we can rewrite this value using shorthand notation Note the importance of the use of 0 to serve as a coefficient of the weight value w 2 =8 2

18 Fixed-Radix Systems Register of length n can represent a number with a fractional part and an integral part k – number of integral digits m – number of fractional digits n=k+m radix point A programmer can use an implied radix point in any position

19 Scaling Factors Fixed point arithmetic can utilize scaling factors to adjust radix point position a – scaling factor no correction must divide by a must multiply by a

20 Scaling Factor Example

21 Unit in the Last Position (ulp) Given w 0 =r -m and n, the position of the radix point is determined Simpler to disregard position of the radix point in fixed point by using ulp Example 98.675 10 1 ulp = 1  10 -3 =0.001 1 ulp is the smallest amount a fixed point number may increase or decrease


Download ppt "ECE 8053 Introduction to Computer Arithmetic (Website: Course & Text Content: Part 1: Number Representation."

Similar presentations


Ads by Google