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 stuck with a problem, enter image description here

Now here is the formula applied to a question, enter image description here

The red colored bits show the exponent(e) while, the yellow bits are fraction (f). Now I am confused with how did the author convert the fraction (f) into 1-2^(-23). I understand that he has converted from binary to decimal to get this value but how do I convert such a big number from binary to decimal?


One trick that my teacher told me was to convert from binary to hexadecimal and then convert the value to decimal easily. But doing that has given me a value 8388607 which is not equal to 1 - 2 ^(-23)

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

The conversion from $23$ bits, all $1$ to $1-2^{23}$ comes from the fact that summing $\sum_{i=1}^{23}2^{-i}=1-2^{-23}$. The final conversion is from $-2^{128}$ (the $2^{104}$ is negligible) to $-3.4E38$, which is done using the base $10$ logarithm of $2$. $\log_{10}2^{128}=128\log_{10}2\approx 128\cdot.30103\approx 38.532$, so $2^{128} \approx 3.4E38$

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.