Take binary expansion and convert it to fraction

254 Views Asked by At

I know how to take a fraction and get it's binary expansion. For example, $\frac{1}{5}$ would go like so:

$\frac{1}{5} \cdot 2 = \frac{2}{5} \rightarrow 0$

$\frac{2}{5} \cdot 2 = \frac{4}{5} \rightarrow 0$

$\frac{4}{5} \cdot 2 = \frac{8}{5} \rightarrow 1$

$\frac{3}{5} \cdot 2 = \frac{6}{5} \rightarrow 1$

$\frac{1}{5} \cdot 2 = \frac{2}{5} \rightarrow 0$

and so it would be $0.\overline{0011}$

But if I'm only given $0.\overline{0011}$ and asked to find the fraction for it, how do I go about finding $\frac{1}{5}$ from it? (i.e. how do I reverse the above process?)

2

There are 2 best solutions below

0
On BEST ANSWER

$$ 0.\overline{0011}=\sum_{k=0}^\infty \left(\frac1{2^3}+\frac1{2^4}\right)\frac1{2^{4k}}=\sum_{k=0}^\infty \frac3{16}\cdot\frac1{16^{k}}=\frac3{16}\cdot\frac1{1-1/16}=\frac15. $$

0
On

You can use the same technique as with repeating decimals:

$$\begin{array}{rcrl}x &=& 0.\overline{0011}\\ 10000_2 x &=& 11.\overline{0011}\\ 1111_2x &=& 11.0000\\ x&=&\dfrac{11_2}{1111_2}&=\dfrac{3}{15}=\dfrac15\end{array}$$