In: Computer Science
In representing -1/4 in IEEE 754, the value of the exponent plus bias (127) is
11111101
01111101
10000000
01111111

b) 01111101
Explanation:
-------------
-0.25
Converting 0.25 to binary
Convert decimal part first, then the fractional part
> First convert 0 to binary
Divide 0 successively by 2 until the quotient is 0
Read remainders from the bottom to top as
So, 0 of decimal is in binary
> Now, Convert 0.25000000 to binary
> Multiply 0.25000000 with 2. Since 0.50000000 is < 1. then add 0 to result
> Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result
> This is equal to 1, so, stop calculating
0.25 of decimal is .01 in binary
so, 0.25 in binary is 00000000.01
-0.25 in simple binary => .01
so, -0.25 in normal binary is .01 => 1. * 2^-2
single precision:
--------------------
sign bit is 1(-ve)
exponent bits are (127-2=125) => 01111101
Divide 125 successively by 2 until the quotient is 0
> 125/2 = 62, remainder is 1
> 62/2 = 31, remainder is 0
> 31/2 = 15, remainder is 1
> 15/2 = 7, remainder is 1
> 7/2 = 3, remainder is 1
> 3/2 = 1, remainder is 1
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1111101
So, 125 of decimal is 1111101 in binary
so, 8-bit exponent is 01111101