Last week, in Number Sense 021, we took a quick look at place value, an invention that lets us represent very large numbers with only 10 different symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). Sometimes we use the comma when writing very large numbers, so I suppose we could say 11 different symbols. Still, that's a small number of symbols to be able to write numbers into the thousands, millions or billions.
This week I'd like us to take a look at what might happen if we had fewer symbols to use. We will take a look at base 4, that is, a number system that only has four symbols: 0, 1, 2 and 3.
We will start with counting. How do we count with only four digits?
Here is a small herd of goats. We start by herding them into a pen, counting as we go...
1, 2, 3... so far, so good. Looks the same as using ten digits. But when we add the next goat to the pen, we have a group of four goats. In base 10 (counting with 10 digits) we used a second column to the left for our groups of 10. We do the same thing here, but the group size is only four.
10 goats in the pen! Base four. We continue counting by adding one to the digit in the “single goat” column, until we run out of goats, or have another group of four.
11, 12, 13, and that's all the goats. One group of four, and three more. If you're superstitious, this is how a lucky number turns into an unlucky number, or vice versa.
If we added one more goat, we would have two groups of four inside the pen, or 20 goats (base four).
Now that we can count in base four, let's draw a number line.
We can use the number line to figure out our base four addition facts
This shows 1 + 1 (red and blue), 1 + 2 (red and green), and 1 + 3 (red and turquoise). 1 + 0 is still 1.
Since addition is commutative (1 + 2 = 2 + 1) we can also fill in the first column of our addition table.
Not much left. Let's do the rest of the 2 row and column
2 + 2 (yellow + green) = 10 and 2 + 3 (yellow + turquoise) = 11
Only one spot left
Now we can do some addition calculations. We've already done simple additions on the number line, so let's do a more complicated one 13 + 22
We'll write it in expanded notation.
That (11) in the sum can be written (10) + (1), so we have to “carry” the (10) over to the second column.
And there is our answer in expanded notation. To change it to standard notation:
But what use is this, other than a purely intellectual exercise? Well, computers, for example, work in binary: on or off, current flowing or no current flowing, switch open or closed. So the internal workings of your laptop is in base two, ones and zeros.
However, trying to read a string of ones and zeros is difficult for actual human beings. We could convert binary numbers into base four numbers easily, without any odd things happening in the addition or multiplication tables. Actually, any power of two will do as a base, and octal (base eight) and hexadecimal (base 16) were in common use in the past.
The computer industry has settled on hexadecimal, though. The problem with base four and base eight is that they both use the same digits as base 10, so it's possible to get them confused. The way around this particular problem is to include a subscript after each number, specifying the base, like so:
Hexadecimal, however, has additional digits that aren't written in base 10: a, b, c, d, e and f.
So engineers deal with numbers that look like this
which are fairly easy to tell apart, without the tedious subscripts.
Have fun in the comments.