Can someone please explain the below and if it means that if x=m/2^n and if m is odd then x can be represented in binary in two ways?

139 Views Asked by At

Reference image containing the statement

Can someone please explain the below text and what it means in simple words? From what I understood it means that if x=m/2^n and if m is odd then x can be represented in binary in two ways? But how is that possible. I tried with 1/2 but how can 0.5 be represented as 0.1 and 0.0111?

2

There are 2 best solutions below

4
On BEST ANSWER

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.

0
On

by definition, $x = (.a_1a_2\dots a_n\dots)_2$ iff $$x=\sum_{i=1}^{\infty}a_i2^{-i}$$ if $x = \frac{m}{2^n}$, for $m$ odd, i.e., $m=2k+1$, then $x=\frac{2k+1}{2^n}=\frac{k}{2^{n-1}}+\frac{1}{2^n}=(.a_1a_2\dots a_{n-1}1000\dots)_2$. But, note that $x$ is also equal to $(.a_1a_2\dots a_{n-1}0111\dots)$ by definition, since \begin{align*} \sum_{i=1}^{\infty}a_i2^{-i} & = a_12^{-1}+\dots+a_{n-1}2^{n-1}+\sum_{i=n+1}^\infty2^{-i}\\ & = \frac{k}{2^{n-1}}+\frac{2^{-n-1}}{1-\frac12}\\ & = \frac{k}{2^{n-1}}+\frac{1}{2^n}\\ & = x \end{align*} so the real reason why every real in binary has two decimal expansions is precisely because $\frac12 = 0.1 = 0.0111\dots$, both series converge to the same number. And in fact this occurs on any numerical basis $b$, since $$(0.1)_b=b^{-1}=\sum_{i=2}^\infty (b-1)b^{-i}=\frac{(b-1)b^{-2}}{1-\frac1b}=(0.0(b-1)(b-1)\dots)_b$$ this is why, for example, $1 = 0.999\dots$ in decimal base.