Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to understand how to convert from decimal to IEEE-754 Single Precision binary representation.

I make up a random number which happen to be 601.00

I tried my best to figure it out and this is what I got:

Step 01: I divided 601 by 9 (since 2^9 is the largest power of 2 divisible by my number) so I got 66.7778

Step 02: I have for the exponent 9 + 127 = 136 which is 10001000 in binary. Step 03: The sign is 0

Right now the representation is: (missing the mantissa) 0 10001000

But what is the mantissa representation for 66.7778 in binary?

share|cite|improve this question
up vote 1 down vote accepted

In step 1, you determined that $2^9$ is the largest power of $2$ less than your number. It doesn't, and doesn't need to, divide your number. Your calculation of the exponent is fine. Then you need to divide your number by $2^9$, not $9$, giving $1.173828125$. This is the number you need to express in binary for the mantissa. You can also get there converting $601$ to binary and shifting $9$ places right. Since $601_{10}=1001011001_2$, you chop off the leading $1$ (it is assumed that the number is normalized) and your mantissa is $001011001$ and $14$ more zeros to fill $23$ bits.

share|cite|improve this answer

Rick Regan may have the answer to your question:

share|cite|improve this answer

Your Answer


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.