Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:

Similar presentations


Presentation on theme: "1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:"— Presentation transcript:

1 1 Module 2: Floating-Point Representation

2 2 Floating Point Numbers ■ Significant x base exponent ■ Example:

3 3 Example1 Fixed point Floating point Significant/fraction Base/Radix Exponent

4 4 Normalized and Unnormalized ■ A floating point number is said to be normalized if the number after the radix point is a non-zero that is, it is not a ‘0’ value. ■ Unnormalized floating number is when the number after the radix point is ‘0’. ■ Example:  normalized  unnormalized  normalized

5 5 Normalization Process ■ Normalization is the process of deleting the zeroes until a non-zero value is detected. ■ Example : ■ A rule of thumb: –moving the radix point to the right  subtract exponent –moving the radix point to the left  add exponent

6 6 Example 2 Decimal Binary - -

7 7 Floating Point Format for Binary Numbers ■ General form: ■ In binary: sign Exponent

8 8 Biased Exponent ■ To eliminate the sign for the exponent value that is the exponent will be positive. sign Biased exponent

9 9 Conversion to Floating Point Number ■ Normalized the number ■ Change the number to biased exponent ■ Form the word (3 fields)

10 10 Example 3 ■ Transform –33.625 to floating point word using the following format (radix 2) ■ The biased constant

11 11 Floating-Point Representation

12 12 Overflow and Underflow

13 13 Normalized Scientific Notation

14 14 IEEE 754 Floating-Point Standard

15 15 IEEE 754 Encoding of Floating-Point Numbers ■ Purpose of NaNs is to allow programmers to postpone some tests and decision a later time in the program when it is convenient.

16 16 Challenge of Negative Exponents ■ Placing the exponent before the significand simplifies sorting of floating-point numbers using integer comparison instructions. ■ However, using 2’s complement in the exponent field makes a negative exponent look like a big number.

17 17 Biased Notation

18 18 Convert 10.4 ten to single precision floating point IEEE 754 Conversion : Example 1

19 19 IEEE 754 Conversion : Example 2 -0.75 = -0.11

20 20 IEEE 754 Conversion : Example 2

21 21 Converting Binary to Decimal Floating-Point Fraction = 0.01b = 0.25

22 22 Module 2: Floating-Point Operations

23 23 Floating-Point Addition Flows

24 24 Decimal Floating-Point Addition Assume 4 decimal digit for significand and 2 decimal digits for exponent

25 25 Binary Floating-Point Addition

26 26 Floating-Point Multiplication Flows

27 27 Decimal Floating-Point Multiplication Assume 4 decimal digit for significand and 2 decimal digits for exponent

28 28 Binary Floating-Point Multiplication

29 29 Floating-Point ALU

30 30 Accurate Arithmetic

31 31 … Accurate Arithmetic


Download ppt "1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:"

Similar presentations


Ads by Google