floating point binary arithmetic

228 Views Asked by At

Prove that the decimal number $\displaystyle \frac{1}{5}$ cannot be represented by a finite expansion in the binary system.

2

There are 2 best solutions below

0
On BEST ANSWER

Suppose that $\frac{1}{5}$ has a finite binary expansion, then $\frac{1}{5} = \sum_{i = 1}^N \frac{1}{2^i}a_i$, where $a_i \in \{0, 1\}$. This implies $2^N = \sum_{i = 1}^N 5 a_i 2^{N-i}$. Both sides of the equality are integers, but right side is a multiple of $5$ while $2^N$ is not.

1
On

HINT: From your earlier post, you know that

a real number has a finite representation in the binary system if and only if it is of the form $$ \pm \frac{m}{2^n}$$ where n and m are positive integers.

How can you apply that here to show that $\displaystyle \frac{1}{5}$ cannot be represented by a finite expansion in the binary system?

Are there any $m, n \in \mathbb{Z}$ such that $\displaystyle \frac{m}{2^n} = \frac{1}{5}$? Why not?

Is there any multiple $m$ such that $5m$ is equivalent to $2^n$ for some $n$?

Put differently, note that for any $n$, $\,5 \not | \;\,2^n$.