I am trying to get my head around the left
and right
shift for binary expansion.
The rules are:
Shifting to the right corresponds to division by 2.
Shifting to the left corresponds to multiplication by 2.
This means if we have: 0.001100110011… = 1/5
If we shift this to the right we get 0.0001100110011… = 2/5 because 1/5÷2 = 2/5
If we shift this to the right we get 0.01100110011… = 1/10 because 1/5÷ 1/10
My question is, how do we get from 0.001100110011 to 1/5? ive tried binary expansion ie
0x2^-1 + 1×2^-2 + 1×2^-3 and so on…
But I get:
819/2048
This isnt 1/5.
Any suggestions?
Best Answer
What you have is $0.\overline{0011}$. The rule is that if you have a string of $n$ repeating symbols corresponding to the number $m$ in base $k$, then this repeating decimal corresponds to the fraction
$$\frac{m}{k^n - 1}$$
One way to see that this holds is that multiplication by $k^n$ would correspond to left shifting $n$ times. In this case, we would get $11.\overline{0011}$. Subtracting the original expression $0.\overline{0011}$ (before left shifting) gives us the number $m$.
So here, $n = 4$, $m = 3$, and $k = 2$, and the value of the decimal is
$$\frac{3}{16-1} = \frac{1}{5}$$