Fun with Base Math: A Primer on Base Numbering Systems

by Fantacmet

What is base math?

You use it every day, you just might not know it.  For those who do, this article is not for you.  This is a primer of sorts, an introduction.

I am by no means a mathlete, and, yes, this does give me a bit of a headache, and does make my eyes hurt, but it's not overly difficult.

The base math you use every day is base10.  You use ten digits.  Not 1-10, but 0-9.  Every single number in the base10 numbering system can be had using those ten digits.

Let's proceed with base8.  The digits of 8 and 9 are not there.  The numbers you use are 0-7.  So, where does 8 go to?  Simple.  In base8 math, 8 = 10.  Hence 9 = 11, and so on.  When you get to 17, you start over at 20, 21, 22, etc.

If you do any subnetting, you are using a different base math - you are using base2, or binary.  You consistently convert from base2 to base10.  Now, any of us who have ever tried to count in binary knows what a bitch it is, so we developed an easy shortcut to go back-and-forth, and easy it is.

Just go from right to left starting with the number 1 and double it up every time you move left.  When you add it up, depending upon if that digit is there, it's determined if there is a 1 or a 0 there.  Those of you who have never been able to figure out the shirt that says, "There Are 10 Types of People in This World: Those Who Understand Binary and Those Who Don't" should now have a clue.  If not, you may want to quit reading at this point.

Now that you have a better understanding of what base numbering systems are and the fact that you use them every day, let's go back to base8 and do some math.

Again, we will count from right-to-left in any given number.  The spot furthest right is 1, just as in base10.  The next spot left is our 8's spot.  Next up is 64th's, and then 512th's, etc.  So each time we move to the left, it is multiplied by 8.  Let's take an example.

Let's use the number 5435 in base8.  What is the base10 equivalent?  First, I will write out the equation:

(5 * 512) + (4 * 64) + (3 * 8) + (5 * 1) = ?

You can do it all up that way which is fine, but if that gives you a headache, we can use a simpler method.  Well, simpler in the minds of some, anyway.  So get out your pen and paper, and we will do this methodically instead.

The first number you want is 5, which is (surprise): 1 * 5

Then you want the next one, which is: 3 * 8

So the next number you write down is 24.

4 * 64 is 256.  5 * 512?  That's 2560.

So what's the answer?  Well, you should have written down all those answers, so go back through and write them down again, because now you need to add them up: 5 + 24 + 256 + 2560 = 2845

So the answer is 5435 in base8 is equal to 2845 in base10.

Now you may notice that some of those numbers in base8 look awfully familiar if you deal with networks at all.  They represent some of the same numbers in binary: 1, 64, 256, 2560.  In the old IBM mainframes, they used 12-, 24-, and 36-bit words.  Base8 was an easy truncation of base2.

With this information, it should be fairly easy to convert between base2 base8, and base10 math.  If you really want to go hog wild, you can use base16.  WTF is base16 and why in the hell would you want to use that, you might be asking?  Well, it's simple...

Base16 is also known as hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.  You got it - in hex, the numbers 10 through 15 are represented by the letters "A" through "F".  Kind of makes hexadecimal make a bit more sense now, doesn't it?  Why use it?  Computers work in binary.  Now, for short things such as IP addresses, subnet masking, and such that are 32-bit dotted quads, binary numbers are fine, though sometimes these are abbreviated in hex.  Hex is a way to abbreviate.  Most people wouldn't be able to remember a 48-bit MAC address in either base2, or base10.  Hex is an easy way to remember it, and it's also a hell of a lot shorter.

This basic premise will work with any base numbering system.

In 1716, King Charles the 12th had requested that a new numbering system based on 64 instead of 10 be created.  Other than to flaunt one's own intelligence, I can see no reason for such a numbering system.  However, it could be done.  I just wouldn't want to do it.

Let's do another short one with a different base numbering system.  Let's try base5, something with an even amount of digits.  So 0-4, that's five digits.

This one should be easy peasy lemon squeazy!  It's multiples of 5.  2234 is the number to convert to base10.  I'm only going to do the equation this time:

(2 * 125) + (2 * 25) + (3 * 5 ) + (4 * 1)

This is 319.  So 2234 in base5 is 319 in base10.

Now that you understand the basics of base math and base numbering systems, go out and create an entirely new science based around one that you feel comfortable with.

Return to $2600 Index