floating point, IEEE-754 single precision representation

Example: 233,7238 (thanks to MIT OpenCourseWare)

233 (decimal) is 11101001 accordingly to http://jimvb.home.mindspring.com/binary.htm

0,7238
(doubling the decimal part…)

1,4476
0,8952
1,7704
1,5408
1,0816
(it continues, but i get bored…)

so… 0,10111…

11101001,10111
(convert into scientific notation…)

1,110100110111*2^7

sign is 0

exp is 7 … 7 + 127 = 134(decimal) … 100001100(digit)
(bias-127 notation)

mantissa is 110100110111

IEEE-754 finally becomes… 1 100001100 110100110111 (and enough zeros to pad to 23 digit the mantissa) 0000000000

Leave a comment