Note that the $1$s go on forever. They don't stop after the first three. This is the binary version of the infamous fact that
$$
0.999\cdots = 1
$$
in decimal. (This equation has its own Wikipedia page.)
I cannot see what equation $(2)$ is in your book, but here's a definition of binary representations which is likely equivalent:
A binary number $(.a_1a_2a_3\cdots)_2$ represents the real number $x$ if
$$
\sum_{n = 1}^\infty \frac{a_n}{2^n} = x.
$$
For your example, $x = \frac12$, the $0.1$ representation is short for $0.1000\cdots$. The infinite sum is then
$$
\sum_{n = 1}^\infty \frac{a_n}{2^n} = \frac12 + 0 + 0 + 0 +\cdots = \frac12.
$$
But for the other representation, $0.0111\cdots$, the sum is
$$
\sum_{n = 1}^\infty \frac{a_n}{2^n} = 0 + \frac14 + \frac18 + \frac1{16} + \cdots.
$$
This is a geometric series which evaluates to = $1/2$, as desired.