Every $x \in [0, 1]$ can be expressed in the form $\dfrac{a_1}{2}+\dfrac{a_2}{2^2}+\dots + \dfrac{a_m}{2^m}+\dots$ , where each $a_i$ equals either $0$ or $1$. For such $x$, we have the binary expansion $x = .a_1a_2 . . . a_m . . .$ .
How can I calculate say $\frac{2}{3}$ quickly in binary expansion form without calculating a_i's one by one manually. I need it for the topic of dynamical system and I don't know some method or available relevant calculator for that.
According to the book, $\frac{4}{5}=.11001100... $ and $\frac{2}{5}=.011001100... $ and $\frac{2}{3}=.101010... $; how to check them quickly?
Thank you.