I have the number 0.625. If I need to convert it into binary form, I can multiply by two:
0.625 * 2 = 1.25 / 1
0.25 * 2 = 0.5 / 0
0.5 * 2 = 1.0 / 1
So the result is 0.62510=0.1012
I'm trying to understand how this algorithm works. The initial form is: $$ x_1\cdot2^{-1} + x_2\cdot2^{-2} + x_3\cdot2^{-3} = 0.625 $$ I can factor out 2-1, so the I'll have: $$ 2^{-1}\cdot(x_1\cdot2^0 + x_2\cdot2^{-1} + x_3\cdot2^{-2}) = 0.625 $$ From here: $$ x_1\cdot2^0 + x_2\cdot2^{-1} + x_3\cdot2^{-2} = 1.25 $$ Now, what logic should I use to tell that x1 is 1 here?
You know all of the $x_i$s are either $0$ or $1$. You also, hopefully know that the infinite sum $$ (2^{-1} + 2^{-2} + 2^{-3} + \cdots) = 1 $$ so in your final equation we have $$ x_1\cdot 2^0 + \underbrace{x_2\cdot 2^{-1}+x_3\cdot 2^{-2}}_{\text{ at most }1} = 1.25 $$ Since the right-hand side is larger than $1$, the $x_1\cdot 2^0$ term must be nonzero -- and the only way to do that when $x_1$ is either $0$ or $1$ is to make $x_1=1$.