In: Computer Science
IEEE 754 format of 32-bit floating-point is as follows.
1 |
8 (bits) |
23 (bits) |
Solution:
Given,
=>IEEE 754 format of 32 bit floating point is given.
1 bit | 8 bits | 23 bits |
(a)
Explanation:
IEEE 754 32 bit frame format:
Sign(S) | Exponent(E) | Mantissa(M) |
1 bit 8 bits 23 bits
=>Hence 1 bit is for sign(S), 8 bits for biased exponent and 23 bits for mantissa part.
(b)
Explanation:
Calculating value of bias:
=>Bias(k) = 2^(exponent bits - 1) - 1
=>Bias(k) = 2^(8 - 1) - 1
=>Bias(k) = 2^7 - 1
=>Bias(k) = 127
=>Hence bias = 127
=>Normalized form = (1-)^S*(1.M)*2^(E-127)
(c)
Given,
=>Decimal value = -0.625
Explanation:
Converting decimal value to binary:
=>-0.625 = (-0.101)2
Converting binary value to normalized form:
=>(-0.101)2 = (-1)^1*(1.01000000000000000000000)*2^-1
=>Hence S = 1 as number is negative
=>E - 127 = -1
=>E = 126 in decimal
=>E = 11111110 in binary
=>M = 01000000000000000000000
=>Hence number in 32 bits = 1 11111110 01000000000000000000000
I have explained each and every part with the help of statements attached to the answer above.