# Need help converting a number into IEEE floating point format

I need to convert the number $74 \frac{5}{14}$ into IEEE floating point format. Can someone help me with this

-
Please stop defacing your questions. – Andrés E. Caicedo Feb 21 '13 at 5:35
@SilentMan You know what? You cannot win, even if you continue to deface them your questions WILL remain, MSE has mechanisms designed to deal with what you are doing. Sorry... – Did Feb 21 '13 at 6:35
What is the purpose of having a rollback war here? Just notify the mods. – Gerry Myerson Feb 21 '13 at 6:36

$74_\text{ten}=1001010_\text{two}$

To convert a number between $0$ and $1$ to binary, write a binary point '.'

1. multiply by two
2. copy the integer part to the binary representation
3. retain the fractional part
4. go to 1.

For $\frac{5}{14}$ we get $.01011011011011011011$. Thus, the binary for $74\frac{5}{14}$ is $$1001010.01011011011011011=1.00101001011011011011011\times2^6$$

The floating point representation is a sign bit (0 = positive, 1 = negative), the exponent of 2 plus 127 (8 bits), the mantissa without the leading '1' (23 bits): $$\overbrace{0}^\text{sign bit}\overbrace{10000101}^\text{exponent}\ \overbrace{00101001011011011011011}^\text{mantissa}$$ If we wish to convert to hexadecimal, we have $$0\text{x}4294\text{B}6\text{DB}$$

The double precision representation is a sign bit (0 = positive, 1 = negative), the exponent of 2 plus 1023 (11 bits), the mantissa without the leading '1' (52 bits): $$\overbrace{0}^\text{sign bit} \overbrace{10000000101}^\text{exponent}\ \overbrace{0010 1001 0110 1101 1011 0110 1101 1011 0110 1101 1011 0110 1101}^\text{mantissa}$$ If we wish to convert to hexadecimal, we have $$0\text{x}405296\text{DB}6\text{DB}6\text{DB}6\text{D}$$

-
Also this explanation, which focuses on double precision. – user53153 Feb 21 '13 at 0:04
@5pm: thanks, I have added double precision to my answer. – robjohn Feb 21 '13 at 8:37

This tool does the job nicely, with single or double precision as desired.

-
The original poster may have wanted mathematical help converting the number into an IEEE floating point number. – Evan Teitelman Feb 20 '13 at 22:36
@Paradoxial That's possible, but does not follow from the question as stated. – user53153 Feb 20 '13 at 22:42
nice link! (+1) – robjohn Feb 20 '13 at 23:43
@5pm: You're right. Nice picture, by the way. (+1) – Evan Teitelman Feb 21 '13 at 0:42

Another tool that I use all the time.

-