For the IEEE Std 754-1935 single precision floating point number, based on the d
ID: 3799265 • Letter: F
Question
For the IEEE Std 754-1935 single precision floating point number, based on the definition, it has 32 bits in total: 1 sign bit, 8 bits for Exponent and 23 bits for Fraction. Exponents 00000000 and 11111111 are reserved. Here are questions: What is the scope of Exponents if we don't consider about the reserved part? What is the scope of "Exponent-bias" if we don't consider about the reserved part? What is the scope of fraction part? What is used to represent 0 in IEEE Std 754-1985 single precision floating point number? What is used to represent Infinities and NaNs in IEEE Std 754-1985 single precision floating point number? What is the smallest value positive value? What is the largest positive value? How to represent -0.75? How to represent 1/3?Explanation / Answer
a) and b)
scope of exponents and exponents bias:
range of exponents: -126 to +127
rane of biased exponents : 1 to 254 (0 and 255 are reserverd i.e. 00000000 and 11111111)
above ranges are calculated by considering reserved 00000000 and 11111111.
c)scope of fraction part:
there are 23 bits for mantissa so we have range of 2^23 = 8388608
d)how to represent 0 in ieee 754 std:
sign = 0 for positive zero, 1 for negative zero.
biased exponent = 0.
fraction = 0.
e)infinities and NaN
infinities:
sign = 0 for positive infinity, 1 for negative infinity.
biased exponent = all 1 bits.
fraction = all 0 bits.
NaN:
sign = either 0 or 1.
biased exponent = all 1 bits.
fraction = anything except all 0 bits (since all 0 bits represents infinity).
f)smallest positive value
considered denormalised number.
Exponent bitstring 08. It's value is -126.
The fraction is (022)1, i.e., 22 zeroes followed by a single 1.
This looks like:
S Exp Fraction
- --------- ----------------------------
0 0000 0000 0000 0000 0000 0000 0000 001
This bitstring pattern maps to the number 0.0221 x 2-126, which is 1.0 x 2-149
g)largest positive value:
the fraction is 123. It looks like:
S Exp Fraction
- --------- ----------------------------
0 0000 0000 1111 1111 1111 1111 1111 111
This bitstring maps to the number 0.(123) x 2-126. This number has 23 bits of precision, since there are 23 1's after the radix point.
h)
-0.75 in IEEE std.
binary representation: 10111111010000000000000000000000
i)
1/3 in IEEE std:
closest value:
00111110101010001111010111000011