converting binary to floating point?
807603Jan 26 2008 — edited Jan 26 2008ok, i am programming a little java program at the consulter
the main idea of the program is to convert a decimal number to IEEE (floating point)
i am almost done except the exponent part
i dont understand the logic behind it
so, for example:
-6.625 = 110.101 (binary)
after normalization it will be -1.10101 * 2^2
so the IEEE will be
1 10000001 10101000000000000000000
i understand the sign part and the fraction part
but i have no idea how the exponent part came like this
the book say that 129-127=+2 so the exponent is 10000001
da, where it came from ???
i will appreciate it if someone explain this part for me step by step
thank you,
Edited by: abdoh2010 on Jan 26, 2008 2:37 AM