When learning to count, we were taught the digits and . We were told that the next number in the sequence is , which consists of the digit written next to . This is the Hindu-Arabic numeral system, which represents a number using the place-value notation. The number is interpreted as . These calculations are done in base 10, which is partially explained by having 10 fingers (including thumbs) which we use to count.
The use of place-value notation in base 10 is not standard throughout history. In fact, many of the great historical civilizations used their own form of number systems. For example, the Babylonains used a sexagesimal (base 60) numeral system, which allowed them to simply represent several fractions. Due to their influence, we now have 60 seconds in a minute, 60 minutes in an hour, and 360 degrees in a circle.
How does number base representation work? The base is the number of unique digits (including zero), which are used in the representation. In this post, will denote the number in base . If a base is not given, it is assumed to be 10.
Suppose that Brilli the ant uses a base 6 system, as she has 6 legs for counting. What would the number mean to us?
Working from the right, we see that there is 1 unit of , and then units of , and finally 3 units of . Hence, we can calculate that
More generally, we can convert a number in base into our decimal system via
How do we reverse this process? What would our number mean to Brilli the ant? We need to find numbers , each taking value or . It can be tedious to guess and check, so we use the following algorithm. We start by performing division by , and record the remainder. We then take the dividend and divide that by again, and record the remainder. This process continues till the dividend is finally 0. We then read the remainders that have been obtained. As an explicit example, to calculate in base 6, we perform the steps:
As such, the algorithm tells us that .
1. Convert into base 3.
Solution: We will work through base 10. First, we convert into base 10. From the above, we know that
Next, we use the algorithm to convert to base 3.
2. Why does this algorithm to convert into base work?
Solution: Suppose we want to convert a number into base . If , then we know that is a multiple of . But since , this tells us that must be the remainder when is divided by .
We are now interested in . Similarly, we obtain that must be the remainder when is divided by . We repeat this process till we terminate at .