If I had been able to find the information on the www I would not have joined the forum. I am not Einstein!
I want to know how to convert the following binary values to floating-point notation using the IEEE standard form:
100 111 000 0000
-111 0111 0110 0000
0.0000 0100 1101
-0.000 0000 0001 0101 1111
I have looked at various websites but cannot find one that explains the procedure in a way that I can understand. I am new to the forum and this is my first post. Any help would be greatly appreciated.
Thanks in advance.
Wikipedia artice on IEEE floating point representation?
Your first number can be written:
1.00 111 000 0000 2^12
This is now in normalized form, so the mantisa will be:
(since we need to pad it to 23 bits)
The exponent will be binary 127+12=139 (the 127 is the offset) or 10001101
binary (which is 8 bits so the right length).
The sign bit is 0.
so we have: 0|10001101|00111000000000000000000 (assuming this is the
default endianism for floats).
Check this as I have not spent much time verifying it myself