P1. (18 points) Using IEEE 754 SINGLE-PRECISION FLOATING-POINT FORMAT (a) Repres
ID: 3168062 • Letter: P
Question
P1. (18 points) Using IEEE 754 SINGLE-PRECISION FLOATING-POINT FORMAT (a) Represent the decimal number 13.5 in IEEE 754 single-precision floating-point format. (b) Represent the decimal number 15.625 in IEEE 754 single-precision (32 bit) floating-point (c) Represent the decimal number -0.75 in IEEE 754 single-precision (32 bit) floating-point (d) What is the decimal value of the following IEEE 754 single-precision floating-point (e) What is the decimal value of the following IEEE 754 single-precision floating-point (f) What is the decimal value of the following IEEE 754 single-precision floating-point format. format. number? 1 0111111 00101000 00000000 00000000 number? 1 01111110 0110000 00000000 00000000 number? 1 10000001 01101000000000000000000Explanation / Answer
(a) We have given that IEEE 754 SINGLE PRECISION FLOATING POINT FORMAT Now, represent the decimal number 13.5 in IEEE 754 single-precision floating-point format.
S = (1-bit binary) Here the sign is positive so, is 0.
Whole Binary Portion = 13 = 1101
Fractional Binary Portion = 0.5 =
= 0.5 x 2 = 1.0 - (1)
So, the fractional part is: 0.1.
Normalized Binary Form = 1101.1 = 1.1011 x 2^3
Unbiased Exponent P = (decimal) 3
Biased Exponent E = (binary) 3 + 127 = 130 = 1000 0010 is the exponent part.
Mantissa: 10110000000000000000000
So, 13.5 = 0 10000010 10110000000000000000000
(b) Represent the decimal number 15.625 in IEEE 754 single-precision (32 bit) floating-point format.
S the sign bit is: 0
Whole Binary Portion 15 = 0000 1111
Fractional Binary Portion = 0.625
= 0.625 x 2 = 1.25 - (1)
= 0.25 x 2 = 0.50 - (0)
= 0.50 x 2 = 1.0 - (1)
So, the fractional part is: 0.101
Normalize Binary Form = 1111.101 = 1.111101 x 2^3
Unbiased Exponent 3
Biased Exponent 3 + 127 = 130 = 1000 0010 is the exponent part.
Mantissa: 11110100000000000000000
So, 15.625 = 0 10000010 11110100000000000000000
(c) Represent the decimal number -0.75 in IEEE 754 single-precision (32 bit) floating-point format.
S the sign bit is: 1
Whole Binary Portion 0 = 0000 0000
Fractional Binary Portion = 0.75
= 0.75 x 2 = 1.5 - (1)
= 0.5 x 2 = 1.0 - (1)
So, the fractional part is: 0.11
Normalize Binary Form = 0.11 = 1.1 x 2^-1
Unbiased Exponent = -1
Biased Exponent -1 + 127 = 126 = 0111 1110 is the exponent part.
Mantissa: 10000000000000000000000
So, -0.75 = 1 01111110 10000000000000000000000
(d) What is the decimal value of the following IEEE 754 single-precision floating-point number? 1 01111110 0101000 00000000 00000000
Here sign bit is 1 which means a negative value.
Biased Exponent is: 01111110 = 126
Unbaising: 126 - 127 = -1 is the exponent.
Denormalizing: 1.0101 x 2^-1 = 0.10101
Converting:
2^0 * 0 + 2^-1 * 1 + 2^-2 * 0 + 2^-3 * 1 + 2^-4 * 0 + 2^-5 * 1
= 0 + 0.5 + 0.125 + 0.03125 = 0.65625
And is a negative value.
So, the answer is: -0.65625
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.