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.

How to convert the number $fada.cafe_{16}$ to binary?

I used Wolfram understand it, but when I type $fada.cafe_{16}$, it changes to $fada.cafdfffffd..._{16}$. Why that?

share|improve this question
1  
This question and some of its answers will help to explain how to do it. –  Old John Dec 11 '13 at 20:06

2 Answers 2

up vote 1 down vote accepted

The numbers $\mathtt{fada.cafe}_{16}$ and $\mathtt{fada.cafdfffffd}..._{16}$ are very close to each other. In http://en.wikipedia.org/wiki/IEEE_floating_point you can see that IEEE double precision arithmetic is accurate to 52 binary digits. And the difference between the two numbers you wrote here is after the 13th HEX digit, that is, the 13*4=52nd BIN digit.

One possibility is that Wolfram converts them to base 10 when reading in the number, and then converts them to base 16 again, loosing a digit in the process. But that's speculation on my part.

share|improve this answer
    
So $\mathtt{fada.cafe}_{16}$ is $1111101011011010.1100101011111110_2$ ? –  Richard Dec 11 '13 at 23:29
    
Yes it is. And if you write out the other number you will see it is almost the same: $\mathtt{1111101011011010.110010101111110111111111111111111101}_2$. –  Stephen Montgomery-Smith Dec 11 '13 at 23:54
1  
The difference is $\mathtt{0.000000000000000000000000000000000101}_2$ (recorded for posterity). –  Stephen Montgomery-Smith Dec 16 '13 at 3:48

Hint: Each hexadecimal digit is represented in binary by four binary digits.

So you can replace the last $e$ with $1110$.

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.