# Terminating decimal number which is not terminating in binary

I know that when converting a decimal number from base 10 to base 2, the result might be not terminating, even though the number is terminating in base 10.

For instance, 0.2 -> 0.0011 0011 0011 ...

Is the contrary possible ? That means, is there a non-terminating decimal number which, converted to base 2, is terminating ? I can't find any !

If yes, is there a method to find them ?

And by the way, what about irrational numbers ? Could an irrational number in base 10 become rational in base 2 or in another base ?

-
What does "periodic" mean here? Why is "0.2" not periodic? –  Chris Eagle Feb 29 '12 at 14:17
To answer the last question: absolutely not. The rationality or irrationality of a number has nothing at all to do with the base in which it’s written: it’s an intrinsic property of the number. –  Brian M. Scott Feb 29 '12 at 14:18
Note that $10 = 5 \cdot 2$, so that you were able to find a number $p/q$ with $(2,q) = 1$ and $(10,q) > 1$ (e.g. $1/5$). The other way around it does not work, since every divisor of $2$ is a divisor of $10$. More generally, for primes $p$, $1/p$ is periodic in base $b$ iff $p$ does not divide $b$. So if it is periodic in the decimal system, then $p$ does not divide $10$ and hence also does not divide $2$. –  TMM Feb 29 '12 at 14:23
@ChrisEagle periodic is not the right english word, I updated the question. –  Jérôme Feb 29 '12 at 14:31

Following TMM's comment, for an expansion to terminate in base $10$, you need to be able to write it as $\frac a{10^n}=\frac a{(2\cdot 5)^n}$ for some naturals $a, n$ For it to terminate in base $2$, you need to be able to write it as $\frac b{2^m}$ for some naturals $b,m$ Given that it terminates in base $2$ with some $b,m$, you can take $n=m, a=2^mb$ to show it terminates in base $10$. If it terminates in base $10$, with some $a,n$, you would like to set $m=n, b=\frac a{5^n}$, but the last may not be a natural and these are the ones that will not terminate. Your example of $0.2_{10}$ fits this exactly.