1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Converting 29 and 0.7 to IEEE single precision floating point

  1. Oct 15, 2005 #1
    I am having difficulty in converting 29 and 0.7 to IEEE single precision floating point.

    For 29,

    I represent 29 as a product of a power of 2 using 58/4 * 21.
    However, I am having trouble getting the mantissa value because 58/4 is 14.5, and I need something in the format of 1.[numbers]. Any help would be great, thanks.

    For 0.7,

    I do not know how I would represent 0.7 as a product of a power of 2 because there is no exact binary number representation for 0.7. Any help would be great, thanks.
     
  2. jcsd
  3. Oct 15, 2005 #2
    are you trying to write a computer program to do this or just need to convert
     
  4. Oct 15, 2005 #3
    Hi,

    I just need to convert it. Not writing a program.
     
  5. Oct 15, 2005 #4
  6. Oct 15, 2005 #5

    Integral

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Isn't 14.5 = 1.[numbers] x101
     
  7. Oct 15, 2005 #6
    Yes, but how would you represent that in mantissa?


    I'll check out that link mathmike, thanks.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?