Using IEEE 754 representation for single precision floating point, give the 32-bit binary encoding for the numbers below.
Show the sign, exponent, and mantissa (significand).
a. -2.40625
b. 11.2265625
a) -2.40625 in simple binary => 10.01101 so, -2.40625 in normal binary is 10.01101 => 1.001101 * 2^1 single precision: -------------------- sign bit is 1(-ve) exp bits are (127+1=128) => 10000000 frac bits are 00110100000000000000000 so, -2.40625 in single-precision format is 1 10000000 00110100000000000000000 sign => 1 exponent => 10000000 mantissa => 00110100000000000000000 b) 11.2265625 in simple binary => 1011.0011101 so, 11.2265625 in normal binary is 1011.0011101 => 1.0110011101 * 2^3 single precision: -------------------- sign bit is 0(+ve) exp bits are (127+3=130) => 10000010 frac bits are 01100111010000000000000 so, 11.2265625 in single-precision format is 0 10000010 01100111010000000000000 in hexadecimal it is 0x4133A000 sign => 0 exponent => 10000010 mantissa => 01100111010000000000000
Get Answers For Free
Most questions answered within 1 hours.