Before reading this, you may want to look over this article on Number Base Representation.
Let's start with a simple problem: Convert to base .
We first convert to base , then convert that to base , as shown by the Number Base Representation article.
We see that . Now we convert this into base :
How many times does go into ? None, we go down to test the next place.
How many times does go into ? times. Now we multiply by to get , and subtract this from to get .
How many times does go into ? Twice, so we multiply by to get , and subtract that from to get .
How many times does go into ? time, so we subtract from to get .
How many times does go into ? times. Finally, our answer is .
Phew, that was a pretty calculation-heavy problem. If only there was an easier way...
Let's look at our original base number and our base number more closely: . Do you notice anything interesting?
How about if I do this: ?
We notice that in each little subdivision, the base representation is automatically converted to the base representation, independent of anything else! For example, , , and .
Why does this work? Let's observe what is happening, fundamentally: We can represent
Let's see what happens when we group this as follows:
Now we factor out the common multiple in each box:
Simplifying, we get that
But wait a minute! The stuff on the is exactly what a base representation looks like! Therefore, we can clearly see that .
Here is the trick in practice: We see that to convert base to base , we group into groups of 2. So we have .
We see that , , , and . Therefore our answer is . You can see how much faster this is than to convert to base , then back to base .
It turns out that to convert a base number to a base number, we group the original number's digits into groups of . I'll prove this later.
How about this problem: Convert to base .
Thinking along the lines of our previous exercise, we try to group the digits in to get the base representation of a number base .
Seeing that , let's try groupings of threes.
We try to group into groups of threes, but we can't, because there are digits and isn't divisible by . What do we do?
Well, we want there to be digits, so we simply add a at the beginning and there will be digits. It won't change the value of the number, so we are safe in doing this.
Now we can group as follows: .
Writing this out as the definition of a base number, we see that
Factoring out and simplifying, we get that .
Simplifying, we get that and we are done.
In practice, you won't go through all of these steps. You'll just see:
, so the leftmost digit is .
, so the middle digit is .
, so the last digit is and our final answer is .
This isn't limited to just powers of two; try this problem for yourself: Convert to base .
Warning: Intense Math Ahead!
Now we'll prove this cool trick for any arbitrary starting base converted into base for some positive integer .
Let the starting number be .
We are assuming that there is a multiple of digits in the number; if this is not the case, add leading 's to the beginning of the number until this is the case.
We represent this number as .
Now we group the digits into groups of each: .
Factoring each group, we get .
Changing to for all , we get that . This is exactly the base representation of a base number, so we are done.
You may think, after reading all of this, that this way of converting bases is way easier; you won't ever need to use the classic convert-to-10-then-to-desired-base trick. However, this is unfortunately not the case. This trick only works for converting a base number to a base number, i.e this trick will not work for converting a base number into a base number. This is because there is not way to group the digits so that one base turns into the other.
However, when in the occasion of changing a base number to a base number, you will know a neat and fast trick to do so. (These occasions happen frequently in competition math.)
*1. * Convert to base .
*2. * Convert to base . Hint: do an intermediate conversion first.
*3. * Convert to base .
*4. * Prove the formula for converting a base number to a base number.