Ruby’s ruminations on...the octal numbering system

Ruby Hryniszak is a regular contributor to the Harborough Mail online.
Ruby Hryniszak is a regular contributor to the Harborough Mail online.

Anybody who’s read a few of my previous pieces will know what my opinion on language and literature is.

For those of you who are uncertain, allow me to clarify: I love language. I have an interest in where words originate from, how the structure of a sentence can change the impact it has and, above all else, I love flamboyant vocabularies.

I don’t like to use a lot of my favourite words because they’re either obscure or out of date (‘spiffing’ being a good example of the latter) and the spontaneity of speech means it’s easier to use less complex terms and favour a quick, witty, flowing conversation.

It’d be unexpected of me to take a turn to the more logical, mathematical side of things, but that’s what I thought I would write about today.

With Christmas gone I’ve been looking into equations and numbers in more depth than I would normally, and I’ve been thoroughly enjoying myself. There’s more relevancy between my sudden interest in numbers and Christmas than is apparent at first glance, and that’s really what I want to explain in this article.

I assume that everybody is aware of the decimal system? I’ll explain briefly, just to be sure, as some of the things I’ll be bringing up later on rely on you having a good, solid knowledge of how the decimal system works.

We count things in blocks of ten - that’s simple - when we get to ten, we start a new block of ten with 11, 12, 13 and so on.

At 100, we just add another block of ten. You all know how to count, I appreciate that. For a minute, though, look at the numbers as symbols that represent a value, rather than actually being that number themselves.

If you take 21 as an example of what I mean: The 2 is representative of how many blocks of ten there are. In decimal, 21 is 2x10+1. That sounds like really basic maths, of course, and I’m sure it’s something you’d have looked at in primary school, but now let’s say that what we know as being the number ten (10, or ‘one-zero’), doesn’t represent a value of ten.

You see, the characters that we use for our numerical system are Arabic symbols, and we’ve given them values to represent. Nobody’s to say that they have to have only that one value.

There are different languages used in different countries, and that doesn’t make them invalid. Some of those countries use the same alphabet we do but the letters don’t mean what we know them to in English. I think you know where I’m going with this now.

There are also different numerical languages in which each symbol has a different value to the one we’re all used to with the decimal system (dec meaning ten - hence the name). It takes a lot of getting used to, I’ll warn you now. It took me a good few hours of reading and scribbling equations in my notebook before I had a definite grasp of the concept, and at the moment I am only able to comfortably convert decimal numbers into one other system: Octal.

Octal is typically used in computer programming and, as you may have guessed from the name, is where the numbers are split into groups of eight.

The symbols used are exactly the same numbers that we’re all used to, but they don’t have the same meaning anymore.

Instead, the number ‘10’ is used to represent a value of eight. That technically means that ‘10’ is not ten but rather the same as what we know to be a decimal ‘8’.

The numbers 1 through 7 stay the same, but once you reach 8, things get a bit more complicated. 8 Becomes 10, which means that 9 becomes 11, 10 becomes 12 and 11 becomes 13.

The numbers carry on as we know them until you reach the next multiple of eight (16), which becomes 20. That sounds crazy, and I admit it’s hard to understand at first, but this is where the simple equation I mentioned earlier comes in. To get 21 in decimal, you multiply 10 by 2 and then add 1.

I don’t know anyone who would have trouble completing that because it’s what we’re used to doing, day-in, day-out.

The confusing part is applying that same method to the octal number system.

It’s a lot easier to understand once you know how to convert from one system to another, because at the minute they’re all just numbers and they all mean the same as they ever have, to your mind, because you’ve been taught that those numbers can only ever show the values you’re used to. Now, here’s how to do the maths...

The easier of the two conversions, by far, is octal to decimal, as that just involves a little bit of multiplication.

Say we have 31 in octal. To get that back to decimal, you do the following: 3x8+1 (look familiar? It’s the same as the equation for decimal, made appropriate for this conversation by replacing 10 with 8). 3x8 gives the answer 24, and 24+1 is 25. Therefore, 31 octal is equivalent to 25 decimal. For numbers in the hundreds, for example 125, you do the following: (1x8x8)+(2x8)+5. That’s the number of blocks of one hundred (in this case just the one) multiplied by 64 (or as I’ve written here, 8, and then by 8 again), plus the number of blocks of ten (2, in this instance) times by 8, plus the last digit of the number.

That gives an answer of 85, meaning that 125 in octal is equal to 85 in decimal. If you’re working with thousands, you’d add another 8 (so 1131 would require this equation to convert it to decimal: (1x8x8x8)+(1x8x8)+(3x8)+1). Once you can get your head around the fact that 10 doesn’t mean ten anymore, it’s a relatively easy conversion to do.

By far the more difficult conversion is decimal to octal. This involves a lot of division, which I suppose is fairly predictable given that octal to decimal is all multiplication. They are opposite functions and that means to go one way, we use multiplication, and to go back, we use the opposite. To go from decimal to octal, first you just need to choose any number from the decimal system. I find it easiest to mark out the numbers in a grid, but you don’t really need to do it that way. You need to know the octal base values (8 squared and 8 cubed), as well as the number you want to convert.

For ease of explanation, my example will be one that I worked out earlier after doing enough research to do the conversion by myself: 250.

To convert 250 into octal, this is what you do: Find the next base value that is equal to or higher than your chosen number. In this case, that’s 8 cubed (or 512).

If the base value is higher than your number, you mark it as having an octal digit (the numbers that will give you an answer) of zero, and move on to the next base value. 250 Is lower than 512, so I mark that as a zero and move on to the next lowest base value, which is 64.

64 Is obviously lower than 250, so what you do next is divide by the base value, and in my example, however many times 250 is divisible by 64 is the number you mark down underneath. 64 Goes into 250 3 times, so 3 is going to be the first number of the octal conversion.

You take the remainder from the last division you’ve done (which is 58 in this case, because 64x3=192 and in order to increase that to 250, you need to add 58).

Then you divide the remainder by the next base value (which, after 64, is 8), and jot down the number of times 8 goes into 58 just the same way you did for 64 and 250. This is the next number in your octal conversion. 58/8 gives and answer of 7, with 2 left over. The last base value you have to divide by is 1, and since the remainder from the last division was 2, that’s the number you need to divide by 1.

Of course the answer to that is going to be 2, and that’s the last bit of division you have to do. You just keep on dividing by base values until you’ve divided by 1, at which point you have the numbers that make up your answer.

The first number I got was 3, the second was 7, and the last was 2. That means that 250 converted into octal is 372. To check your answer you can just use the equation that translates octal back to decimal, and see if you end up with the number you started out with in the first place.

I think that the whole process makes a lot more sense once you understand how to convert the numbers both ways, because you get a better feel for how the two systems work with each other.

Up until this point this article has been very maths heavy and I appreciate that it’s probably difficult to understand right away - especially converting from decimal to octal. That was the difficulty I had, above all else. I struggled to get the division right before I found the method I’ve explained here,

I found another that was far more complicated and, to be honest, didn’t make very much sense. There are a few other reasons I decided to write about maths and number systems, as well as my growing interest in the mathematical world.

One is a psychological experiment. I bet most people will still read octal as “Five, six, seven, ten, eleven, twelve...” when really that’s still decimal and you should be counting the way you always would. I find it interesting how difficult the human brain finds understanding familiar symbols that have unusual values.

We’re taught that one is always one, and that one looks like a ‘1’, and the same for every other number. It’s so ingrained into our subconscious that we don’t know any better and so we struggle to comprehend anything other than what we’re taught.

We’re more exposed to language and different uses of it, so that seems more understandable, and whilst we may not be able to speak in or read foreign languages, we know and appreciate what they are. Different numerical systems seem almost completely alien to start with, because it’s hard to get your head around the idea that ‘10’ isn’t ten anymore.

The other is that I found this especially inspiring. I felt as though learning how to count in a different way opened up my mind and made me realise that not everything is what we’re taught it is, and that just because we’re told it means one thing, doesn’t mean it can’t be anything else.

A computer will always be a computer, and a sofa will always be a sofa (although I suppose if you wanted to you could start calling your computer a sofa, and vice versa - you might be deemed mad but there’s nothing stopping you from doing so).

That rule doesn’t apply to numbers, however, because whilst mathematics is full of rules and guidelines, you can do what you like with the numbers. There’s a number called ‘Graham’, and at some point, somebody had to invent the number zero, because for a long while it didn’t exist.

I can’t quite understand how anybody would’ve been able to do any serious equations without using zero but for a while, it just didn’t exist at all. There are so many rules for different equations and so many different methods but using different systems shows that they aren’t set in stone.

I found that quite inspiring, and also very much enjoyed doing the mental gymnastics it took for me to finally understand the maths (mental gymnastics: the only exercise I am truly addicted to).

I like to look at it almost philosophically, and think that if something so strict as maths can be manipulated to mean whatever you want it to, so can anything else.

Here’s another interesting counting method used by the Yuki people of California: They count using a 4-based system, using the spaces between their fingers to count rather than the fingers themselves.

There’s an Amazonian tribe called the Munduruku, who’s language has no tenses, no plurals and no words for any numbers above five.

Another tribe - the Piraha - don’t have any subordinate clauses in their language, nor any more than three pronouns, they hardly use any words associated with time and apparently past tense verb conjugations don’t exist. They also haven’t described any colours in their language, and they don’t seem to have any words for numbers, period. They have one word which can be used numerically, but that doesn’t refer to a specific amount.

It sounds phenomenal that an entire group of people are able to survive without any use of numbers, but they have done. There are no other tribes like the Piraha anywhere and whilst it’s not so common in our culture, there are a good few tribes who don’t use numbers nearly as much as we do.

Let it be said that I do not like maths (I resented it when I was at school) but never let it be said that I don’t take an interest in unusual uses for things.

As well as the octal system, there are so many other different ways of using numbers to represent things, from binary to hexadecimal (which is a lot like octal, except it uses sixteen instead of eight).

I have no intention of learning them all, but it’s interesting to know that they exist and it certainly gives a sense of freedom to the mathematical world.

It’s also quite mind-blowing, I found, and hopefully I’m not the only one who thought so.

Maths is everywhere, from your computer screen to the shell on a snail’s back (have a look into the golden ratio for more about that) and whilst it’s a uniform subject, it’s interesting in parts and it can be used to express nearly anything if you know how to use it.

I talk a lot about language, but numbers are a language all of their own and having so many different meanings for those few Arabic characters really brings light to that.

Column by Ruby Hryniszak.

Ruby is a regular contributor to the Harborough Mail online.

Follow Ruby on Twitter, @13eautifulLife.