Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
    
If this is a homework question, please tag it as such. That way people can tailor their responses to be more helpful. –  robjohn Feb 20 '13 at 23:14
5  
Please stop defacing your questions. –  Andres 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
8  
What is the purpose of having a rollback war here? Just notify the mods. –  Gerry Myerson Feb 21 '13 at 6:36

3 Answers 3

$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} $$

share|improve this answer
    
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.

Conversion

share|improve this answer
    
The original poster may have wanted mathematical help converting the number into an IEEE floating point number. –  paraxor 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) –  paraxor Feb 21 '13 at 0:42

Another tool that I use all the time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.