Question

In: Computer Science

Consider the following 32-bit floating point representation based on the IEEE floating point standard: There is...

  1. Consider the following 32-bit floating point representation based on the IEEE floating point standard:
    1. There is a sign bit in the most significant bit.
    2. The next eight bits are the exponent, and the exponent bias is 28-1-1 = 127.
    3. The last 23 bits are the fraction bits.
    4. The representation encodes number of the form V = (-1)S x M x 2E, where S is the sign, M is the significand, and E is the biased exponent.
    5. The rules for the IEEE standard for normalized, denormalized, representation of zero, infinity, and NaN still apply.

  1. What is the valid range of values for the biased exponent E? -126 to ______

  1. What is the biased exponent E for denormalized values? ______
  1. Match the following values in decimal (base 10 form) or descriptions with the corresponding 32-bit binary representation (fill in with a-h):

  1. Negative infinity             _____ 1. 01000000111000000000000000000000
  2. Positive zero          _____ 2. 11000000011000000000000000000000
  3. 3.5                           _____ 3. 01000000011000000000000000000000
  4. 7.0                            _____ 4. 11000000111000000000000000000000
  5. -3.5                          _____ 5. 00000000000000000000000000000000
  6. -7.0                           _____ 6. 01111111100000000000000000000111
  7. Not-a-Number (NaN)            _____ 7. 01111111100000000000000000000000
  8. Positive infinity              _____ 8. 11111111100000000000000000000000

Solutions

Expert Solution

Solution:

a) What is the valid range of values for the biased exponent E? -126 to ______

The valid range of values for the biased exponent E is from -126 to +127. These values are for single-precision floating-point representation i.e. for 32-bit number.

b) What is the biased exponent E for denormalized values?

A denormal number is represented with a biased exponent of all 0 bits, this represents a value -126. The smallest biased exponent representing a normal number is 1

c)

  1. Negative infinity             ___b__ 1. 01000000111000000000000000000000
  2. Positive zero          ___e__ 2. 11000000011000000000000000000000
  3. 3.5                           ____c_ 3. 01000000011000000000000000000000
  4. 7.0                            ___f__ 4. 11000000111000000000000000000000
  5. -3.5                          __b___ 5. 00000000000000000000000000000000
  6. -7.0                           ___g__ 6. 01111111100000000000000000000111
  7. Not-a-Number (NaN)            __h___ 7. 01111111100000000000000000000000
  8. Positive infinity              ___a__ 8. 11111111100000000000000000000000

Infinity is represented with all 1's in the exponent and all 0's in the fraction part. For negative infinity, the sign bit is 1 and for positive infinity, the sign bit is 0.

Zero is indicated with all 0's in the exponent and fraction. For positive 0, the sign bit is 0.

Floating-point exception results if the computation is not a number. For representing these kinds of results we use the Not-a-Number format. It is represented either 0/1 in sign bit, all 1's in the exponent field, and anything other than all 0's in the fraction field.

Representation of 3.5:

(representation of floating-point numbers: 1 sign bit, 8 bits of exponent field, 23 bits of mantissa field.)

3 in binary is 011, 0.5 in binary is 1. Concatenating the result: 11.1 is the binary representation of 3.5

as this is +ve number, the sign bit is 0. 11.1 is represented as 1.11 * 2^1. This indicates, the exponent is 1 i.e 127+1 which is 128. 11 is the mantissa field.

Representation of 128 in binary is 10000000

The mantissa is 11, and its representation is 11000000000000000000000.

So the result is 01000000011000000000000000000000

So for 3.5 the result is 01000000011000000000000000000000

Representation of -3.5:

The result is exactly the same as 3.5 except that the sign bit indicates the value as -ve. So the sign bit is 1 in this case.

So the result is 11000000011000000000000000000000

Representation of 7.0:

(representation of floating-point numbers: 1 sign bit, 8 bits of exponent field, 23 bits of mantissa field.)

7 in binary is 111, 0.0 in binary is 0. Concatenating the result: 111.0 is the binary representation of 7.0

as this is +ve number, the sign bit is 0. 111.0 is represented as 1.11 * 2^2. This indicates, the exponent is 1 i.e 127+2 which is 129. 11 is the mantissa field.

Representation of 129 in binary is 10000001

The mantissa is 11, and its representation is 11000000000000000000000.

So the result is 01000000111000000000000000000000

So for 7.0 the result is 01000000111000000000000000000000

Representation of -7.0:

The result is exactly the same as 7.0 except that the sign bit indicates the value as -ve. So the sign bit is 1 in this case.

So the result is 11000000111000000000000000000000


Related Solutions

Convert 1.67e14 to the 32-bit IEEE 754 Floating Point Standard, with the following layout: first bit...
Convert 1.67e14 to the 32-bit IEEE 754 Floating Point Standard, with the following layout: first bit is sign bit, next 8 bits is exponent field, and remaining 23 bits is mantissa field; result is to be in hexadecimal and not to be rounded up. answer choices 5717E27B 57172EB7 5717E2B7 C717E2B7 5771E2B7
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point...
verilog code to implement 32 bit Floating Point Adder in Verilog using IEEE 754 floating point representation.
Show the IEEE 32-bit representation for 2.09375 and 17.1875
Show the IEEE 32-bit representation for 2.09375 and 17.1875
Q1.Convert C46C000016 into a 32-bit single-precision IEEE floating-point binary number.
Q1.Convert C46C000016 into a 32-bit single-precision IEEE floating-point binary number.
Given the following 32-bit binary sequences representing single precision IEEE 754 floating point numbers: a =...
Given the following 32-bit binary sequences representing single precision IEEE 754 floating point numbers: a = 0100 0000 1101 1000 0000 0000 0000 0000 b = 1011 1110 1110 0000 0000 0000 0000 0000 Perform the following arithmetic and show the results in both normalized binary format and IEEE 754 single-precision format. Show your steps. a)     a + b b)     a × b
c) Using the 32-bit binary representation for floating point numbers, represent the number 1011100110011 as a...
c) Using the 32-bit binary representation for floating point numbers, represent the number 1011100110011 as a 32 bit floating point number. i) A digital camera processes the images images in the real-world and stores them in binary form. Using the principles of digital signal processing, practically explain how this phenomenon occurs.
Convert the following number into 32bit IEEE 754 floating point representation. 0.000101
Convert the following number into 32bit IEEE 754 floating point representation. 0.000101
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754...
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754 standard is
These questions concern the following 16-bit floating point representation: The first bit is the sign of...
These questions concern the following 16-bit floating point representation: The first bit is the sign of the number (0 = +, 1 = -), the next nine bits are the mantissa, the next bit is the sign of the exponent, and the last five bits are the magnitude of the exponent. All numbers are normalized, i.e. the first bit of the mantissa is one, except for zero which is all zeros. a) What is the largest number? (in both 16-bit...
Concern the following 16-bit floating point representation: The first bit is the sign of the number...
Concern the following 16-bit floating point representation: The first bit is the sign of the number (0 = +, 1 = -), the next nine bits are the mantissa, the next bit is the sign of the exponent, and the last five bits are the magnitude of the exponent. All numbers are normalized, i.e. the first bit of the mantissa is one, except for zero which is all zeros. 1. What's the smallest difference between two consecutive or adjacent numbers?...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT