For example, to convert $0.25$ to binary. Using this algorithm it gives the correct result $0.01$:
- Multiply by two
- take decimal as the digit
- take the fraction as the starting point for the next step
- repeat until you either get to 0 or a periodic number
- read the number starting from the top - the first result is the first digit after the comma
Trying to understand why all this with the multiplying by two actually works, I do this: $$0.25=0.01=\frac{1}{2}(0+\frac{1}{2}(1+\frac{1}{2}*0))$$ So, the multiplying by two comes from dividing by $\frac{1}{2}$. But when I do the multiplying by two I cannot get the numbers in the brackets. This is what I get: $$0.25=0.5*\frac{1}{2}+0$$$$0.5=1*\frac{1}{2}+0$$$$1=2*\frac{1}{2}+0$$Can someone show me how to do that or point me if I make a mistake somewhere?
Long division works in any base. If you pay attention, you can spot the periodicities in the expansion. So sharpen your Miss Wormwood pencil and check it out.
Example: I will obtain the binary expansion of 1/3 this way.
0.010 ----------------- 11 ) 1.00000000000 11 --- 100 11 ---- 1You can see that the binary expansion of $1/3$ is $.0101010101010....$