4 The other way around?

Given a value represented in base 10, can we convert it to another base? In other words, given the decimal number 98, can we find its octal (base-8) representation?

The answer, of course, is yes! Here is how we do it.


$\displaystyle 98 \div 8$ $\textstyle =$ $\displaystyle 12 \mathrm{r} 2$ (9)
$\displaystyle 12 \div 8$ $\textstyle =$ $\displaystyle 1 \mathrm{r} 4$ (10)
$\displaystyle 1 \div 8$ $\textstyle =$ $\displaystyle 0 \mathrm{r} 1$ (11)
$\displaystyle 0 \div 8$ $\textstyle =$ $\displaystyle 0 \mathrm{r} 0$ (12)
$\displaystyle ...$     (13)

Now, all we have to do is the read the remainders from the bottom: 0142. This, indeed, is the representation of ninety-eight in base-8!



Copyright © 2006-08-21 by Tak Auyeung