In: Computer Science
Concert the following 32-bit floating point number (IEEE single precision) into their decimal representation.
1100 0101 0001 1111 1000 0000 0000 0000 (ANSW: -2552.0)
Please show all work
1 10001010 00111111000000000000000 sign bit is 1(-ve) exp bits are 10001010 => 10001010 => 1x2^7+0x2^6+0x2^5+0x2^4+1x2^3+0x2^2+1x2^1+0x2^0 => 1x128+0x64+0x32+0x16+1x8+0x4+1x2+0x1 => 128+0+0+0+8+0+2+0 => 138 in decimal it is 138 so, exponent/bias is 138-127 = 11 frac bits are 00111111 IEEE-754 Decimal value is 1.frac * 2^exponent IEEE-754 Decimal value is 1.00111111 * 2^11 1.00111111 in decimal is 1.24609375 => 1.00111111 => 1x2^0+0x2^-1+0x2^-2+1x2^-3+1x2^-4+1x2^-5+1x2^-6+1x2^-7+1x2^-8 => 1x1+0x0.5+0x0.25+1x0.125+1x0.0625+1x0.03125+1x0.015625+1x0.0078125+1x0.00390625 => 1+0.0+0.0+0.125+0.0625+0.03125+0.015625+0.0078125+0.00390625 => 1.24609375 so, 1.24609375 * 2^11 in decimal is 2552.0 so, 11000101000111111000000000000000 in IEEE-754 single precision format is -2552.0 Answer: -2552.0