Docsity

IEEE 754 Floating Point Representation and Operations - Prof. Sudhakar Yalamanchili, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
1 (a) Provide the hexadecimal representation of a denormalized number in single precision
IEEE 754 notation. What is the purpose of denormalized numbers?
1 (b) Assuming IEEE 754 rules and conventions, what is the result of the following operation
in hexadecimal notation.
• 1.101 x 2112 X 1.01 x 212 (note that the exponent values are represented in base
10).
A denormalized number is a floating point number that is smaller than
the smallest number that can be represented in IEEE 754 notation. It is
encoded by using a zero expronent value and a non-zero significand. An
example of single precsion denormalized number would be
0x00001100. Recall that a zero exponent generally signifies the number
0.
Remember that the exponents are biased. Thus when we add the exponents we
subtract 127 to obtain the correct value of the biased exponent of the
product. However when we do this we find that we have
112+12-127 = -3. Since the value of the biased exponent is less that 0, we
have underflow.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download IEEE 754 Floating Point Representation and Operations - Prof. Sudhakar Yalamanchili and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

1 (a) Provide the hexadecimal representation of a denormalized number in single precision IEEE 754 notation. What is the purpose of denormalized numbers?

1 (b) Assuming IEEE 754 rules and conventions, what is the result of the following operation in hexadecimal notation.

- 1.101 x 2^112 X 1.01 x 2^12 (note that the exponent values are represented in base 10).

A denormalized number is a floating point number that is smaller than the smallest number that can be represented in IEEE 754 notation. It is encoded by using a zero expronent value and a non-zero significand. An example of single precsion denormalized number would be 0x00001100. Recall that a zero exponent generally signifies the number

Remember that the exponents are biased. Thus when we add the exponents we subtract 127 to obtain the correct value of the biased exponent of the product. However when we do this we find that we have 112+12-127 = -3. Since the value of the biased exponent is less that 0, we have underflow.

1 (c) Assuming that we have 6 significant digits (including the implicit bit), does the follow- ing calculation produce any error? If so what is the magnitude of the error?

1.001 x 2^121 + 1.1 x 2^128

After adjusting the expoent value of the smaller number have

1.1000000000 x 2^128 + 0.0000001001 x 2^128


1.1000001001 x 2^128

With 6 significant digits the answer is 1.1 x 2^128

The magnitude of the error is 1.001 x 2^121

3 (a) How would you interpret the following hexadecimal number assuming that it is a single precision IEEE 754 floating point number: 0x00140000?

3 (b) Assuming IEEE 754 rules and conventions, what is the result of the following operation in hexadecimal notation.

- 1.101 x 2^142 X 1.01 x 2^122 (note that the exponent values are represented in base 10).

It is a denormalized number since the exponent is 0, but the significand is non-zero.

1.000001 x 2^138

4 (a) Assuming a total of 4 significant digits including in the implicit bit, is there any inaccu- racy in the following IEEE 754 computation? Justify your answer by showing how this value is calculated, and identifying the magnitude of the error if any.

(1.01 x 2^125 ) X (1.001 x 2^129 )

1.001000 x


1.01101 x 2125+129-127= Rounding down gives us (since the last two digits are 01) 1.011 x 2127

There is an error and the magnitude of the error is 0.00001 x 2127

5 (a) Assuming IEEE 754, what is the result of the following operations

- 1.1101 x 2^102 X 1.01 x 2^172 (note that the exponent values are represented in base 10).

5 (b) Consider a double precision floating point number (IEEE 754). As it turns out, the range of numbers that it can represent is not sufficient for your application. Keeping the total number of bits constant, how would you change the format of the number?

5 (c) What is the smallest positive number you can represent in IEEE 754 double precision format. Represent this number in scientific notation.

1.0010001 x 2^148

The number of bits in the exponent determines the range. This number should be increased at the expense of the number of bits in the significand.

1.0 x 2-

6 (a) Assuming a total of 6 significant digits including the implicit bit, is there any inaccuracy in the following computation? Justify your answer by showing how this value is calculated, and identifying the magnitude of the error if any.

6 (b) Assuming a total of 6 significant digits including the implicit bit, is there any inaccuracy in the following computation? Justify your answer by showing how this value is calculated, and identifying the magnitude of the error if any.

(-1.11 x 2-2) + (1.01 x 2^3 )

The rounded value that is obtained in 1.0011 x 2^3. The difference between this value and the actual value (assuming a sufficient number of bits) is given by 0.0000001 x

  1. The correct value is 1.0011001 x 2^3.

(-1.1 x 2-1) + (1.001 x 2^4 )

Correct answer: 1.000101 x 2^4 Rounded answer: 1.00011 x 2^4 Error: 0.000001 x 2^4

- 1.0001 x 2^133 + 1.0101 x 2^139

7 (c) Provide an example of a number that is too small to be represented with single precision notation but can be represented with double precision.

7 (d) What does the following bit pattern represent

00111100 00001001 01000000 00000000. Provide your answer in the form indicated.

7 (e) Assuming a total of 4 significant digits including in the implicit bit, is there any inaccu- racy in the following IEEE 754 computation? Justify your answer by showing how this value is calculated, and identifying the magnitude of the error if any.

1.0001 x 2^133 + 1.0101 x 2^139 =

0.0000010001 x 2^139 + 1.0101 x 2^139 = 1.0101 x 2^139 (the result is rounded down according to the rules for 754).

1.0 x 2-130^ This number is just smaller than the smallest number that can be represented in single preceision numbers.

A single precision IEEE 754 floating point number (show actual value in scientific notation) ____1.000100101 x 2-7____________________

(1.11 x 2^114 ) X (1.01 x 2^119 )

The product is 1.00011 x 2^107 With only 4 significant digits and the next two bits being 11, we round up to give 1.001 x 2^107 The maginitude of the error is 0.00001 x 2^107