Making Sense of Bases

Emily DeHoff
4 min readMay 11, 2022

--

Photo by Mika Baumeister on Unsplash

We live in a base 10 (decimal) world, but that’s not the only way to represent numbers. In fact, computers operate purely in base 2 (binary) and many cultures have traditionally used other bases for their written number systems as well.

There are a couple key components of any number system. The first is the number of digits you want to use. This defines your base. In base 10, for example, we have ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The second component is the value that each position in a given number has. In school you might have heard this referred to as the place value. These will be multiples of your base. Looking at base 10 again, we have the ones place (10⁰), the tens place (10¹), the hundreds place (10²), the thousands place (10³), etc. We can visualize this by creating a table.

So what does it look like to represent something in base 10? Consider this wonderful collection of dots.

To count these dots in base 10, we want to know how many thousands we have, how many hundreds, how many tens, and finally how many ones. You can think about this in the same way that you would make change with coins. If you’re trying to give someone 72 cents, you’re probably going to start by using as many quarters as you can, then going for dimes, then nickels, and finally resorting to pennies only when absolutely necessary. Notice you wouldn’t even bother reaching for a dollar bill because it’s just too big.

The same idea applies here. We can start by finding the smallest place value in our table that is bigger than the number of dots we have. In this case, it’s the 10² place. We definitely don’t have any hundreds here, so we can safely ignore that column (and every column to the left of it). This means we’re left with the tens and ones places. We want to take advantage of the bigger place values as much as we can. So, how many tens of dots do we have? If you’re thinking two, then we’re on the same page. We still have some left over, so we move on to the ones place. How many ones do we have left? Five. So we end up with something like this.

And hey, that looks an awful lot like 25, doesn’t it? Success! Now I know you probably already knew how to do that, but walking through this process with something familiar and seeing how we actually construct the numbers we take for granted will be hugely helpful when we move on to more unfamiliar number systems.

Let’s try our hand at base 2. This means we’re only using two digits (0 and 1), and our place values will be multiples of two. So our chart will look like this.

Let’s look at the same collection of dots as before, this time counting them in base 2.

We already know that we have fewer than 32 dots, so we can ignore the 2⁵ column and everything to its left. How many sixteens do we have? One. Now we have 9 dots left. How many eights in those remaining dots? One. Now we only have 1 dot left, so how many fours? None. Twos? None. Ones? One. In the end we have this:

So what did we just discover? 25 in base 10 is equivalent to 11001 in base 2. Pretty cool, huh?

The fact that you’re likely reading this article on a digital device means that the binary number system is alive and well in your life. Deep down, our computerized world runs on binary code (also machine code). This video with the late Federico Gómez Suárez and one of my all time favorite humans, Limor Fried explains how computers use binary to do virtually everything.

But wait, there’s more. Have you heard of hex color codes?

Yep, those are actually numbers in the hexadecimal number system (base 16). Since we only have ten numerical digits at our disposal, base 16 utilizes letters as well as numbers, so the digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. Each place value is a multiple of 16, and we end up with numbers like FFFFFF (white), 000000 (black), and 679289 (wintergreen dream). Wild, huh?

I’ll leave you with one last nugget about bases. Let this be a warning to you though, knowledge is power. Use it wisely.

--

--