There are 10 types of people in the world: those who understand binary, and those who don’t.

I find this joke amusing, although you might not; I’ve been told that my taste in jokes is somewhat questionable.  The other day, I came up with this one – Q: how does a naval engineer see the world?  A: Littorally – perhaps partially inspired by my reading of Warfare on the Mediterranean in the Age of Sail, which I found amusing, but no one else did.  Anyway, this post is not intended as a catalog of my questionable taste in humor (best joke of mine: the idea of me being a stand-up comedian), and before being derailed by my attempt at a catchy introduction was intended to talk about number systems.

A recent conversation prompted me to reflect on number systems, and I realized that this might be a topic worth covering in more detail here.  We discussed the concept briefly in our post about 5G technology, but it is well worth exploring in more detail, on both practical and theoretical levels.  This is one of those concepts that is both simple and mind-bending, so I will being doing my best to explain and explore it for you here.  As always, if you have any questions following this discussion, I’m more than happy to engage further in the comments.

Whether or not you are aware of it, I am certain that all of you are familiar with at least one base system: the decimal system, base ten.  It is how almost all of us learned to count, and most of us think of it as the way to count, if we think about it at all.  We learn how to count things in base ten from such an early age that it becomes one of those assumptions about the universe that is so fundamental that we don’t even think to question it, and for most people and most cases that’s a reasonable assumption.  That being said, it is still an assumption, and in truth there is nothing fundamental about the universe that makes base ten distinct from any other system of counting.  Even in human history there are examples of alternate counting systems – I believe it was the Sumerians who used base six, and are therefore to blame for the illogic of modern timekeeping – so this is not something reserved to mathematicians with too much time on their five-fingered hands.

When I say “base ten,” “base six,” “decimal system,” “hexadecimal system,” “binary system,” or “system of counting,” I am referring to the most fundamental level of mathematics: the number system itself.  Say that I give you a pile of dried beans and ask you to count them.  A simple, if tedious task: you start from zero, and beginning counting up until you’ve counted all the beans, and you report a number to me.  This isn’t something that you’ll really need to think much about, unless I gave you a simply preposterous number of beans.  This is how numbers and math in general were first invented – our ancient ancestors needed to count things.  They started out using their fingers (or sometimes their gods’ fingers, as in the case of the aforementioned Sumerians), and when they ran out of fingers, they needed a way to count higher.  Thus, number systems were invented.

Eventually, concepts such as zero and negative numbers were introduced, and in most cases a number system consisting to ten digits arose.  In what has come to be known as the decimal system, there are ten, unique digits with which to count: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.  If you need to count higher than that, you’re obliged to add a “place,” which gives us 10, then 11, 12, 13, and so forth.  Following this pattern allows us to express any whole number unto infinity.  We can also express fractions using these basic numbers, but that is a different mathematical topic that would add unnecessary complexity to this discussion.

Imagine that you are a child first learning to count, but that instead of being a human child with ten fingers, you are an alien child with just two tentacles.  There is a pile of marbles that you need to count, and so you start keeping track of them on your tentacles.  You count to two, and then you stop, puzzled, unsure how to count further.  So you call your friend over, and you count his tentacles, too, and now you have a quantity of two twos.  If you call another friend over, who also counts two marbles, then you would now have two twos and one two.  Another friend gives two two twos.  In other words, in this number system, what we would in our number system call “8” would be expressed as “222.”

Starting number systems at zero makes a lot more sense, which is why the above system starting at one is kind of complicated.  However, all of this will make little sense if we don’t digress to talk a little about the nature of numbers themselves.  We think of numbers as distinct entities, for they are given, in the decimal system, their own symbols, but all those symbols are is a shorthand for the names that we have chosen to assign to a certain group of counts.  Some inventive child thousands of years ago made piles of marbles with different counts, and said that the first one had one marble, the next one had two marbles, so forth.  If you can get away from thinking of 1, 2, 3, and so forth as distinct entities, and instead think of them simply as arbitrary names for a given quantity, the rest of this discussion will make a lot more sense.  I do acknowledge, though, that doing so is much more easily said than it is done.

With that established, we are now in a position to start to grasp just what a number system actually is: an arbitrary system by which to organize and express quantities.  It is composed of some quantity of fundamental digits, whether that’s two, ten, sixteen, twenty seven, or one hundred and twenty eight (and I realize the certain irony of expressing these all in base ten, but such are the limitations of language – henceforward I will express base ten numbers in written form, and numbers in other base systems in digit form).  We use base ten for most purposes in day-to-day life, but other systems are also common: binary (base two) and hexadecimal (base sixteen), for instance, are commonly used with computers.  Since they are semi-common, let’s take a closer look at them.

If you read the post about 5G technology that I mentioned previously, the discussion of binary will sound vaguely familiar.  In binary, or base two, we have just two digits: 0 and 1.  If we have a pile of marbles that has two marbles in it, in base two we would express that as 10 marbles (hence the joke at the beginning of the post).  Three marbles would be expressed as 11, and four would be expressed as 100.  You can continue in this pattern to express any quantity that you would in base ten.  Expressing three billion, one hundred forty one million, five hundred ninety two thousand, six hundred fifty three in base two would simply be the horribly long number 10111011010000001110011001001101.

Hexadecimal, instead of having fewer digits than base ten, has more: sixteen, to be precise.  Classically, these are listed as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F, which should hopefully help to drive home the idea that the symbols that we use to designate numbers are completely arbitrary.  So the number ten in base sixteen is just A, and the number 10 in base sixteen is sixteen in base ten.  1A in base sixteen is twenty six in base ten.  That ugly base ten number we used for the binary example is the significantly shorter BB40E64D in base sixteen.

These may be commonly used, but you can have any base system you can imagine.  Base seven might not have much useful purpose right now, but there’s nothing stopping you from using it.  Or maybe a system where the base number is that three billion number we were tossing around in the previous paragraphs, in which case it would just be expressed as 1.  Since you can do mathematical operations on these numbers analogous to what you would do in base ten, this can sometimes be a technique to simplify really ugly math problems involving very large numbers, although it is worth noting that I say “analogous” for a reason, as many standard mathematical operations in base ten do not transfer directly to other base systems, but must be re-derived.

I don’t know how useful this information will be in your day-to-day lives.  While I use alternate base systems, especially hexadecimal, semi-regularly in the course of my work, I acknowledge that most of you may well go through life without ever encountering any number not in base ten.  It would be irrational for me to claim that this post will really make a difference in how you see the world or even have an impact on all but a few of you, but I still think it is worth both the writing and the reading.  Understanding that all of mathematics is based on counting, and that we can count in any way we want, is both freeing and enlightening.  Increasingly, numbers in alternate base systems underpin everything we do, though we may not be aware of it.  This post may even serve as the foundation, eventually, for a discussion of how computers work at an electromechanical level.

Whatever you may have gotten out of this discussion, I hope that I at least succeeded in communicating clearly what base systems are and how they operate (and I hope that you will not be insulted that I spent almost two thousand words explaining to you how counting works).  If you have any further questions on this or related topics, please feel free to engage with me in the comments below.  If nothing else, now you can be the former of the 10 types of people in the world.

2 thoughts on “Number Systems

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s