I have a question related to the expression of a real number in base 4. Consider the table here: it is clear to me how all columns of the table are obtained except the fourth one: how do they get the positional representation in quaternary base?
1 Answers
The non-repeating ones like $\frac{1}{2},\frac{1}{4}$ are obvious. For the others we repeatedly use $\frac{1}{1-x}=1+x+x^2+x^3+\dots$.
We have $\frac{1}{3}=\frac{1}{4}\frac{1}{1-\frac{1}{4}}=\frac{1}{4}(1+\frac{1}{4}+\left(\frac{1}{4}\right)^2+\dots=\frac{1}{4}+\left(\frac{1}{4}\right)^2+\left(\frac{1}{4}\right)^2+\dots=0.111\dots$.
Hence $\frac{1}{12}=0.011111\dots$ and $\frac{1}{6}=0.02222\dots$
We have $\frac{1}{15}=\frac{1}{16}\frac{1}{1-\frac{1}{16}}=\frac{1}{16}+\left(\frac{1}{16}\right)^2+\left(\frac{1}{16}\right)^3+\dots=0.010101\dots$ Hence $\frac{1}{5}=0.030303\dots$.
We have $\frac{1}{7}=\frac{9}{63}=\frac{9}{64}\frac{1}{1-\frac{1}{64}}=\frac{9}{64}\left(1+\frac{1}{64}+\left(\frac{1}{64}\right)^2+\dots\right)=0.021021021\dots$. Hence $\frac{2}{7}=0.102102102\dots$ and so $\frac{1}{14}=0.0102102102\dots$.
and so on.
- 18,380
-
Not obvious to me: what's the rule behind $1/2$ for example? – May 27 '16 at 10:53
-
1@user299158 You want $\frac{1}{2}$ in base 4. So $\frac{1}{2}=\frac{2}{4}$, hence we can write it as $0.2_4$. – almagest May 27 '16 at 10:55
-
I see, thank you. Could you help me also with this to be sure I understood? Consider $\frac{5}{7}$: As $7$ is not multiple of $4$ should I proceed with the method in your answer? – May 27 '16 at 11:03
-
Moreover, how does it work for real numbers that cannot be express as a simple fraction? – May 27 '16 at 11:06
-
1@user299158 You can easily get $\frac{5}{7}$ from $\frac{1}{7}$. Dealing with irrational numbers is quite different. – almagest May 27 '16 at 11:15
-
Thanks. I don't get $\frac{1}{7}$. Can I do $\frac{1}{7}=\frac{1}{8}\frac{1}{1-\frac{1}{8}}=\frac{1}{8}+\frac{1}{8^2}+...=0.02+0.02^2+0.02^3+...= $ but then I don't get something repeated...What am I doing wrong? I guess also $\frac{1}{11}=\frac{1}{12}\frac{1}{1-\frac{1}{12}}=\frac{1}{12}+\frac{1}{12^2}+...=0.01111..+0.01111...^2+0.01111..^3+$ is wrong, right? – May 27 '16 at 12:58
-
1Your problem is that neither $8$ nor $12$ are powers of $4$. So $\frac{1}{8}=\frac{2}{16}=0.02$, but then $\frac{1}{8^2}=\frac{1}{64}=\frac{1}{4^3}=0.001$ and so on, so it is messier to get to the answer. – almagest May 27 '16 at 13:03
-
BTW I still don't $\frac{1}{7}$ as you do: $\frac{1}{7}=\frac{9}{63}=9\times \frac{1}{63}=9\times (\frac{1}{64}+\frac{1}{64^2}+...)=9\times (0.001+0.001^2+...)$ – May 27 '16 at 13:16
-
1That is fine, but then $9=21_4$, so you carry out the multiplication. – almagest May 27 '16 at 13:18