# How do you convert $(12.0251)_6$ into fractions?

How do you convert $(12.0251)_6$ (in base 6) into fractions?

I know how to convert a fraction into base $x$ by constantly multiplying the fraction by $x$ and simplifying, but I'm not sure how to go the other way?

-

I assume you want decimal notation in your fraction. We have $$(12.0251)_6=(1\times 6^1) + (2\times 6^0) +\frac{0}{6^1}+\frac{2}{6^2}+\frac{5}{6^3}+\frac{1}{6^4}.$$

Bring the right-hand side to the common denominator $6^4$, and calculate. Equivalently, multiply by $6$ often enough that you get an integer $N$ ($4$ times) and divide by that power of $6$. After a while, we get that $N=10471$. Since $6^4=1296$, $$(12.0251)_6=\frac{10471}{1296}.$$

Another way: Note that $(12.0251)_6=\dfrac{(120251)_6}{(10000)_6}$. Convert numerator and denominator to base $10$. This looks slicker, but the computational details are the same.

Comment: There is a nice trick for making the calculation of the numerator easier. It goes back almost two thousand years in China, and is sometimes called Horner's Method, after an early 19th century British schoolmaster. We work from the left. Calculate in turn

$(1\times 6)+2=a$

$(a\times 6)+0=b$

$(b\times 6)+2=c$

$(c\times 6)+5=d$

$(d\times 6)+1=e$

Our numerator is $e$. We find that $e=10471$.

Horner's Method does not really speed up things in this small calculation. But with longer calculations, there is substantial gain. Horner's Method is a useful tool when we want to evaluate a high degree polynomial $P(x)=a_0x^n+a_1x^{n-1}+ \cdots +a_n$ at a particular numerical value of $x$. With a bit of practice, it is even a handy tool for evaluation of polynomials with a calculator. There is no need to ever "store" intermediate results.

-
Thanks, but why is the first term 6? – Arvin Nov 10 '11 at 7:44
@Arvin: $(12.0251)_6= 6^1 \times 1 + 6^0 \times 1 + 6^{-1} \times 0 + 6^{-2} \times 0 +\cdots+ 6^{-4} \times 1$. – Quixotic Nov 10 '11 at 7:46
What about if the 0251 part is repeating? as in, the questions is $(12.\overline{0251})_6$ – Arvin Nov 10 '11 at 8:01
For repeating, note that $(.0251)_6=\frac{103}{6^4}$. So the repeating part is the infinite geometric series $(103/6^4)(1+1/6^4+1/6^8+\cdots)$. The inner sum is $1/(6^4-1)$. – André Nicolas Nov 10 '11 at 8:25
Note that for some people, Horner's method is more familiarly known as "synthetic division", as dividing a polynomial in $x$ by $x-a$ and evaluating that same polynomial at $x=a$ are equivalent tasks. – J. M. Nov 10 '11 at 8:42

You could use continued fractions.

                       Cf     A   /  B
12.0251           1  /  0      In the left, we produce a
1.0000  -12.0000    8      8  /  1      continued fraction from
-0.5420    0.0251   12     97  / 12      12.0521 and 1.0000, in base 6
0.0140   -0.0140    1    105  / 13        There are Cf of the positive
-0.0111    0.0111    1    202  / 25      number, which gives the negative
0.0025   -0.0054    2    511  / 63      number.
-0.0013    0.0013    1    713  / 88        The right is Cf(r-1) + Cf(r-2)
&c                            starting at 1 in A and 0,1 in B.


You stop when the error gets precise enough, or you get a zero in either column.

-