2

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 Answers2

5

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.

Polygon
  • 1,854
  • Would this hold for other values like 3/8 or 5/4? I mean the cases where m (numerator) is odd and denominator is 2 raised to the power n? Then also, would there be two ways of representing the decimal fraction in binary as per the given condition? – さまVipul Mar 30 '24 at 16:19
  • Yes, this holds for every number of the form $m/2^n$. This is what the book is claiming. (And for decimal, you'll get two representations for numbers of the form $m/10^n$.) – Polygon Mar 30 '24 at 16:26
  • I am mostly clear about it but I still can't figure out how would someone find out the alternative representation of binary for a given m/2^n. Let's say 3/4 or 5/8. I could find the normal binary representations for these but how do I get the alternative representation to prove that this holds? Any help? Apologies if I'm asking something irrelevant. – さまVipul Mar 30 '24 at 19:21
  • 1
    It's every number which "terminates" (ends with infinitely many $0$s) that has two representations. To get the other representation, replace the last $1$ with a $0$, and replace all the following $0$s with $1$s. For example, $5/8 = (0.101)_2$ = $(0.101000\cdots)_2$. The other representation is $(0.100111\cdots)_2$. This is actually what your book describes in a different way. – Polygon Mar 30 '24 at 19:41
1

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.