<p>3 bits per octal digit was convenient on old time machines which used words of  12, 18, 36 bits words. Easier to do mental calculations than with  hexadecimal.</p>

<p>For example, you have the PDP family : PDP-1 &amp; 4 are 18 bit machines, PDP-2 24 bits, PDP-3 and -6  36 bits, PDP-5 12 bits, etc.</p>

<p>PDP-11 was a 16 bit machine, but as far as I remember the documentation explained low level stuff with octal numbers.</p>

<p>At the time, characters were often coded on 6 bits (IBM 704 BCD, DEC SIXBIT, ...)</p>

<p>See <a href="https://en.wikipedia.org/wiki/Six-bit_character_code" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Six-bit_character_code</a></p>

<p>So the fundamental question is: why are you teaching numeration systems at all? Did you ever have to explain why</p>

<pre><code>int month = 09;
</code></pre>

<p>is refused by the C compiler (and lots of modern languages), where as 07 and 10 are ok? And 012 is october?</p>

<p>You'll <em>have</em> to talk about octal numbers, even if you don't want to! :-)</p>

CC BY-SA 4.0
2018-05-24T13:52:11.107Z
Cool: `012` is October (latin for 8th month). ☺
ctrl-alt-delor
CC BY-SA 3.0
2017-12-02T19:56:31.387Z
2017-12-04T15:25:49.113Z
2017-12-04T15:25:49.113Z
Michel Billaud
<p>One vestige of octal notation is in UNIX (includes macosx) file permissions.  You can say ($ is your system prompt)</p>

<pre><code>$ chmod 644 file.txt
</code></pre>

<p>and change all rings (user, group, and other) permissions in a quick and compact way.  The first argument to <code>chmod</code> is a three-digit octal number.  The first digit represents user permissions, the second group, and the third others.  Read permission has value 4, write 2, and execute 1.  The combinations work as follows</p>

<pre><code>0  none
1  x
2  w
3  wx
4  r
5  rx
6  rw
7  rwx
</code></pre>

<p>So, in the example above, the user has read/write permission, groups read, and others read.</p>

CC BY-SA 4.0
2019-02-05T19:08:53.180Z
2019-02-05T19:08:53.180Z
ncmathsadist
<p>One lesson that hasn't been mentioned yet is that the basic (manual) algorithms that students use for addition, subtraction, etc. are independent of base. In Octal, you just "carry" when you get to "eight" rather than the "ten" they use with decimal numbers. This is a unifying concept that is useful to know. </p>

<p>Not that it is especially relevant, but it is said that if you have horse that can write and ask it to write out "ten" it will write "22". Similarly, if you ask it to stamp its foot 10 times, you hear "stamp, stamp, stamp, stamp". </p>

<p>While the above paragraph is intended as a joke, it provides a certain insight into number bases that might actually be helpful to students. </p>

<p>I also find it interesting that different European languages have names for the smaller numbers up to some limit, but the limit differs by language. </p>

<p>German, like English, has number names for 1 - 12, with 13 being a compound(-ish) name thir-teen (three and ten), or dreizehn. French, on the other hand has names for 1 - 16, with dix-sept (ten and seven) being 17. But the Latin-derived languages (Romance Languages) aren't consistent in this. Italian, for example, only has individual names for 1-10, with eleven being undici (one and ten) and Spanish has names for 1-15 with 16 being dieciséis (ten and six). German uses <em>null</em> for 0, and the Romance languages seem to use some form of <em>zero</em>, perhaps accented, zéro in French. I haven't done a comprehensive search, however. </p>

<p>It may be that the names of these numbers derive from commercial considerations, early marketplaces/marketdays, for example, and so depend more on local culture. This is a bit distinct from their use in mathematics, which tends to be more uniform. </p>

<p>And note that English is a compound language with both Germanic and French roots and we take 1-12 from German, but 0 from French. </p>

CC BY-SA 4.0
2019-02-14T14:05:46.063Z
This answer doesn't explain why Octal is important, it only talks about other base systems in general. Therefore I don't see its relevance to the question.
Roland Illig
CC BY-SA 4.0
2019-02-14T14:11:48.470Z
@RolandIllig, yes, perhaps. I intend to provide a bit of background on the larger issue as a service to classroom teachers.
Buffy
CC BY-SA 4.0
2018-05-24T15:04:15.530Z
2018-05-26T15:20:10.853Z
2018-05-26T15:20:10.853Z
Buffy
<p>As a step toward learning binary or hexadecimal. Show that we use many number bases everyday: base 24 and 60 in a clock; base 7 and base 30ish in a calender; base 16 and 14 in weights (in US); base 12 and 3 in distance (US); etc.</p>

<p>Then introduce octal. Octal has an advantage that it is not too different to Denary (Decimal), and that it dose not introduce new symbols (like hexadecimal).</p>

<p>After octal, head toward binary, maybe brefly explore the idea of other bases, and ask how low can we go? Binary is the limit.</p>

<p>Then  binary to octal, but look at how this does not fit will in to 8 bit bytes. What can we do about this. Base 4 or base 16. Base 4 does not help us much, but is used by DNA. Base 16 helps us reduce number of digits, but we need 6 more symbols (a-f).</p>

CC BY-SA 4.0
2018-05-24T13:49:51.793Z
2018-05-24T13:49:51.793Z
ctrl-alt-delor
<p>The value might not be in knowing octal itself (although as noted in the comments, there is inherent relevance to it). Rather, it might be what learning different bases teaches about abstraction and the representations of numbers in general.</p>

<p>I think of this Essential Knowledge statement from the AP CS Principles curriculum:</p>

<blockquote>
  <p><strong>EK 2.1.1G</strong> Numbers can be converted from any base to any other base.</p>
</blockquote>

<p>The transition from decimal to binary is one step, and the move to hexadecimal can be an even bigger jump. To then have students see that there can be base-8 or base-32 or base-60 or base-37 is at times mind-blowing. The design of a particular base system, while not entirely arbitrary, is a design choice that comes with advantages and trade-offs. </p>

<p>Moreover, this process of conversion to and from different base systems strengthens students understanding of the underlying algorithmic process. The example I share with students is that 100 in any base system is equal to the value of that base squared. (Indeed it verges upon tautology.) Part of that is breaking down the idea of the 1s place being followed by the 10s followed by the 100s, etc. and replacing it with 10^0 followed by 10^1, etc. Replacing 10 with 2, 8, 16, or any other integer becomes trivial.</p>

<p>Having students see that 100 is not so much "one hundred" but a combination of base numbers and exponents and <em>why that is</em> is powerful.</p>

CC BY-SA 3.0
2017-05-24T15:35:23.480Z
2017-05-24T17:41:36.213Z
2017-05-24T17:41:36.213Z
Peter
<p>Sometimes you just want to group your bits 3 at a time instead of 4.</p>

<p>Octal groups 3 bits per digit. Hexadecimal groups 4 bits per digit.</p>

<p>For example Unix file permissions are written in octal because each group of 3 bits represents read, write and execute for either the user, group, or "other people".  That is, the permissions 110110000 represent permissions <code>rw-rw---</code> on the mask <code>rwxrwxrwx</code> where the group of 3 maps to (user, group, other).  You can write it as 110110000, octal 660 or symbolically <code>ug=rw</code>. 6 always means read, write, but not execute no matter what position it is in. The position always means who is affected. However writing it in hexadecimal would be useless: 1B0 doesn't visually indicate to the reader what the permissions are.</p>

<p>In hardware systems grouping 3 bits at a time makes sense when many controllers each have 3 bits of value.  An octal number like 0123 means send 001 to the first controller, 010 to the second controller, and 011 to the third controller.</p>

<p>Older computers were not 16-, 32-, or 64-bit but instead were often 9-bit or 36-bit.  In that case, octal makes more sense because each group of 3 bits was a digit.</p>

<p>Reading older code often requires knowing octal because older code uses octal for many of the reasons listed above.</p>

<p>EDIT --- and even with recent code, you may encounter problems as </p>

<pre><code> january = 01;
 february = 02;
 ...               // disaster waiting to happen
</code></pre>

<p><a href="https://softwareengineering.stackexchange.com/questions/221797/reasoning-behind-the-syntax-of-octal-notation-in-java">https://softwareengineering.stackexchange.com/questions/221797/reasoning-behind-the-syntax-of-octal-notation-in-java</a></p>

CC BY-SA 3.0
2017-12-02T18:06:31.680Z
I agree, I thing it can also be useful to practice other number bases. Base 3 is interesting when you have digits of `-`, `0` and `+`. There are other number bases that they may already know: E.g ask when is $11 + 3 = 2$?
ctrl-alt-delor
CC BY-SA 3.0
2017-12-05T05:06:10.837Z
+1 on a working example... until you throw the setuid/setgid/sticky bits in :)
ivanivan
CC BY-SA 4.0
2017-05-26T01:27:09.057Z
2019-02-10T08:13:17.587Z
2019-02-10T08:13:17.587Z
TomOnTime
<p>It's <em>necessary</em> to know about octal because some compilers and tools will interpret multi-digit numbers with leading zeros differently to how many people will read them. Tracking down this sort of bug is very hard (as in spoken language where two people interpret words differently - maybe a useful analogue to work into a conversation).</p>

<p>I found two other relevant questions on SE:
<a href="https://softwareengineering.stackexchange.com/questions/98692/where-are-octals-useful">https://softwareengineering.stackexchange.com/questions/98692/where-are-octals-useful</a></p>

<p><a href="https://stackoverflow.com/questions/2609426/in-what-situations-is-octal-base-used">https://stackoverflow.com/questions/2609426/in-what-situations-is-octal-base-used</a></p>

<p>The first identifies quite a lot of genuine legacy applications, which seem to be driven in the main by resource constraints which are not likely to be so relevant any more. The second question doesn't add anything more that I can see.</p>

<p>About the only time where Octal could be useful is in packing more separate items into a 32 bit register, and I'm struggling to decide if this is just obvious or actually a useful concept. It's closely related to ideas like video encoding, where RGB can be packed as 5,5,6 bits - but I'm not aware of this leading to the use of octal in the representations. Video is of course one of the areas today where resource constraints are very real (8.3 Mp per frame@60 Hz).</p>

CC BY-SA 3.0
2017-12-04T13:14:32.080Z
The first case is more about teaching the idiosyncrasies of the tools involved.
Bob Brown
CC BY-SA 3.0
2017-05-25T13:52:14.797Z
2017-05-25T13:52:14.797Z
Sean Houlihane
<p>An octal representation is shorter, in characters, than a binary representation for data with any number of bits greater than one.</p>

<p>Unlike hexadecimal, an octal representation can be displayed using only numeric characters, of which certain old technologies (such as Nixie tubes and 7-segment LEDs) were capable (back, depending on the students age, perhaps in ancient history).</p>

CC BY-SA 3.0
2017-06-13T06:12:43.677Z
@SeanHoulihane How much has TCP/IP changed since the 1970s? Where would this site be if nobody understood such ancient technology? Sometime one cannot escape the current, real-world application of ancient technology. Were relevant it must still be a _modern education topic_.
Gypsy Spellweaver
CC BY-SA 3.0
2017-06-13T07:28:18.813Z
@GypsySpellweaver - not quite sure I get your meaning, but I see legacy constructs holding back design all the time. Teaching legacy stuff as if it had meaning is a big mistake.
Sean Houlihane
CC BY-SA 3.0
2017-05-25T13:27:22.560Z
I don't think this is a _relevant_ answer here. It might fit in retrocomputing, but I get twitchy every time people use 1970's tech (or earlier) to justify a modern education topic.
Sean Houlihane
CC BY-SA 3.0
2017-05-25T19:26:25.310Z
7 seg can do a-f
ctrl-alt-delor
CC BY-SA 3.0
2017-12-29T16:28:46.740Z
Those who don’t study history (including computer history) are condemned to repeating historical mistakes.
hotpaw2
CC BY-SA 3.0
2017-05-24T20:44:47.613Z
2017-05-24T20:44:47.613Z
hotpaw2
<p>I was teaching the Octal number system and a student raised the question "Why should we use the octal number system, if we have binary and hexadecimal?" I was very confused, trying to explain the importance of this topic. </p>

<p>For context, I am teaching a course about the relationship between hardware and software.</p>

CC BY-SA 3.0
2017-05-25T19:27:40.520Z
I suspect it is easier to teach octal before hexadecimal. Then explain that it is not used **much** these days, but is still used.
ctrl-alt-delor
CC BY-SA 3.0
2017-05-27T14:52:46.913Z
Could you please tell: what is the subject of the whole lesson? I'm trying to guess the amount of time devoted to the octal system and its place in the general context of the lesson. Because, per my opinion, learning explicitly octal for those who already have experience with binary and hexadecimal is really unneeded — octal is used *relatively* rare and a student having experience with other 2ⁿ-base systems would catch it on-the-fly when he meets it in real life. I'd rather ensure that they know two topics: generic conversion and m-base↔mⁿ-base conversion (especially for m=2).
Sasha
CC BY-SA 3.0
2017-12-03T03:48:17.230Z
It was important to know in the 1980s, when there were still computers for which the natural expression of the bit-ness was octal in common use. There are still Unix-isms where knowledge of octal is useful,  otherwise I'd agree it's mostly a waste of time.
pojo-guy
CC BY-SA 4.0
2018-05-27T17:59:19.223Z
I teach my students octal and ask them, each year: Why do computer programmers confuse Halloween with Christmas? Answer: https://armchairdissident.wordpress.com/2009/04/15/a-long-explanation-of-a-damned-fine-joke/
Ellen Spertus
CC BY-SA 4.0
2019-02-09T10:50:59.107Z
Actually lots of current programming languages follow the brillant idea of octal numbers starting with 0. What could go wrong with   int january = 01, february = 02, ...;
Michel Billaud
<number-system>
The use of the Octal system
# The use of the Octal system

(Asked by: username_0 on 2017-05-24)

I was teaching the Octal number system and a student raised the question "Why should we use the octal number system, if we have binary and hexadecimal?" I was very confused, trying to explain the importance of this topic.

For context, I am teaching a course about the relationship between hardware and software.

**Tags:** number-system

> **Comments:**
> **username_1**: I suspect it is easier to teach octal before hexadecimal. Then explain that it is not used **much** these days, but is still used.  
> **username_2**: Could you please tell: what is the subject of the whole lesson? I'm trying to guess the amount of time devoted to the octal system and its place in the general context of the lesson. Because, per my opinion, learning explicitly octal for those who already have experience with binary and hexadecimal is really unneeded — octal is used *relatively* rare and a student having experience with other 2ⁿ-base systems would catch it on-the-fly when he meets it in real life. I'd rather ensure that they know two topics: generic conversion and m-base↔mⁿ-base conversion (especially for m=2).  
> **username_3**: It was important to know in the 1980s, when there were still computers for which the natural expression of the bit-ness was octal in common use. There are still Unix-isms where knowledge of octal is useful,  otherwise I'd agree it's mostly a waste of time.  
> **username_4**: I teach my students octal and ask them, each year: Why do computer programmers confuse Halloween with Christmas? Answer: https://armchairdissident.wordpress.com/2009/04/15/a-long-explanation-of-a-damned-fine-joke/  
> **username_5**: Actually lots of current programming languages follow the brillant idea of octal numbers starting with 0. What could go wrong with   int january = 01, february = 02, ...;  

---

## 8 answers

### Answer by username_9 on 2017-05-24. Score: 12 | Accepted answer

The value might not be in knowing octal itself (although as noted in the comments, there is inherent relevance to it). Rather, it might be what learning different bases teaches about abstraction and the representations of numbers in general.

I think of this Essential Knowledge statement from the AP CS Principles curriculum:

> **EK 2.1.1G** Numbers can be converted from any base to any other base.

The transition from decimal to binary is one step, and the move to hexadecimal can be an even bigger jump. To then have students see that there can be base-8 or base-32 or base-60 or base-37 is at times mind-blowing. The design of a particular base system, while not entirely arbitrary, is a design choice that comes with advantages and trade-offs.

Moreover, this process of conversion to and from different base systems strengthens students understanding of the underlying algorithmic process. The example I share with students is that 100 in any base system is equal to the value of that base squared. (Indeed it verges upon tautology.) Part of that is breaking down the idea of the 1s place being followed by the 10s followed by the 100s, etc. and replacing it with 10^0 followed by 10^1, etc. Replacing 10 with 2, 8, 16, or any other integer becomes trivial.

Having students see that 100 is not so much "one hundred" but a combination of base numbers and exponents and *why that is* is powerful.


---

### Answer by username_10 on 2017-05-26. Score: 10

Sometimes you just want to group your bits 3 at a time instead of 4.
Octal groups 3 bits per digit. Hexadecimal groups 4 bits per digit.
For example Unix file permissions are written in octal because each group of 3 bits represents read, write and execute for either the user, group, or "other people".  That is, the permissions 110110000 represent permissions rw-rw--- on the mask rwxrwxrwx where the group of 3 maps to (user, group, other).  You can write it as 110110000, octal 660 or symbolically ug=rw. 6 always means read, write, but not execute no matter what position it is in. The position always means who is affected. However writing it in hexadecimal would be useless: 1B0 doesn't visually indicate to the reader what the permissions are.
In hardware systems grouping 3 bits at a time makes sense when many controllers each have 3 bits of value.  An octal number like 0123 means send 001 to the first controller, 010 to the second controller, and 011 to the third controller.
Older computers were not 16-, 32-, or 64-bit but instead were often 9-bit or 36-bit.  In that case, octal makes more sense because each group of 3 bits was a digit.
Reading older code often requires knowing octal because older code uses octal for many of the reasons listed above.
EDIT --- and even with recent code, you may encounter problems as 
 january = 01;
 february = 02;
 ...               // disaster waiting to happen

https://softwareengineering.stackexchange.com/questions/221797/reasoning-behind-the-syntax-of-octal-notation-in-java

> **Comments:**
> **username_1**: I agree, I thing it can also be useful to practice other number bases. Base 3 is interesting when you have digits of `-`, `0` and `+`. There are other number bases that they may already know: E.g ask when is $11 + 3 = 2$?  
> **username_11**: +1 on a working example... until you throw the setuid/setgid/sticky bits in :)  

---

### Answer by username_12 on 2017-05-25. Score: 6

It's *necessary* to know about octal because some compilers and tools will interpret multi-digit numbers with leading zeros differently to how many people will read them. Tracking down this sort of bug is very hard (as in spoken language where two people interpret words differently - maybe a useful analogue to work into a conversation).

I found two other relevant questions on SE:
<https://softwareengineering.stackexchange.com/questions/98692/where-are-octals-useful>

<https://stackoverflow.com/questions/2609426/in-what-situations-is-octal-base-used>

The first identifies quite a lot of genuine legacy applications, which seem to be driven in the main by resource constraints which are not likely to be so relevant any more. The second question doesn't add anything more that I can see.

About the only time where Octal could be useful is in packing more separate items into a 32 bit register, and I'm struggling to decide if this is just obvious or actually a useful concept. It's closely related to ideas like video encoding, where RGB can be packed as 5,5,6 bits - but I'm not aware of this leading to the use of octal in the representations. Video is of course one of the areas today where resource constraints are very real (8.3 Mp per frame@60 Hz).

> **Comments:**
> **username_13**: The first case is more about teaching the idiosyncrasies of the tools involved.  

---

### Answer by username_14 on 2017-05-24. Score: 3

An octal representation is shorter, in characters, than a binary representation for data with any number of bits greater than one.

Unlike hexadecimal, an octal representation can be displayed using only numeric characters, of which certain old technologies (such as Nixie tubes and 7-segment LEDs) were capable (back, depending on the students age, perhaps in ancient history).

> **Comments:**
> **username_12**: I don't think this is a _relevant_ answer here. It might fit in retrocomputing, but I get twitchy every time people use 1970's tech (or earlier) to justify a modern education topic.  
> **username_1**: 7 seg can do a-f  
> **username_15**: @SeanHoulihane How much has TCP/IP changed since the 1970s? Where would this site be if nobody understood such ancient technology? Sometime one cannot escape the current, real-world application of ancient technology. Were relevant it must still be a _modern education topic_.  
> **username_12**: @GypsySpellweaver - not quite sure I get your meaning, but I see legacy constructs holding back design all the time. Teaching legacy stuff as if it had meaning is a big mistake.  
> **username_14**: Those who don’t study history (including computer history) are condemned to repeating historical mistakes.  

---

### Answer by username_5 on 2017-12-02. Score: 2

3 bits per octal digit was convenient on old time machines which used words of  12, 18, 36 bits words. Easier to do mental calculations than with  hexadecimal.
For example, you have the PDP family : PDP-1 & 4 are 18 bit machines, PDP-2 24 bits, PDP-3 and -6  36 bits, PDP-5 12 bits, etc.
PDP-11 was a 16 bit machine, but as far as I remember the documentation explained low level stuff with octal numbers.
At the time, characters were often coded on 6 bits (IBM 704 BCD, DEC SIXBIT, ...)
See https://en.wikipedia.org/wiki/Six-bit_character_code
So the fundamental question is: why are you teaching numeration systems at all? Did you ever have to explain why
int month = 09;

is refused by the C compiler (and lots of modern languages), where as 07 and 10 are ok? And 012 is october?
You'll have to talk about octal numbers, even if you don't want to! :-)

> **Comments:**
> **username_1**: Cool: `012` is October (latin for 8th month). ☺  

---

### Answer by username_6 on 2019-02-05. Score: 1

One vestige of octal notation is in UNIX (includes macosx) file permissions.  You can say ($ is your system prompt)
$ chmod 644 file.txt

and change all rings (user, group, and other) permissions in a quick and compact way.  The first argument to chmod is a three-digit octal number.  The first digit represents user permissions, the second group, and the third others.  Read permission has value 4, write 2, and execute 1.  The combinations work as follows
0  none
1  x
2  w
3  wx
4  r
5  rx
6  rw
7  rwx

So, in the example above, the user has read/write permission, groups read, and others read.


---

### Answer by username_7 on 2018-05-24. Score: 1

One lesson that hasn't been mentioned yet is that the basic (manual) algorithms that students use for addition, subtraction, etc. are independent of base. In Octal, you just "carry" when you get to "eight" rather than the "ten" they use with decimal numbers. This is a unifying concept that is useful to know.

Not that it is especially relevant, but it is said that if you have horse that can write and ask it to write out "ten" it will write "22". Similarly, if you ask it to stamp its foot 10 times, you hear "stamp, stamp, stamp, stamp".

While the above paragraph is intended as a joke, it provides a certain insight into number bases that might actually be helpful to students.

I also find it interesting that different European languages have names for the smaller numbers up to some limit, but the limit differs by language.

German, like English, has number names for 1 - 12, with 13 being a compound(-ish) name thir-teen (three and ten), or dreizehn. French, on the other hand has names for 1 - 16, with dix-sept (ten and seven) being 17. But the Latin-derived languages (Romance Languages) aren't consistent in this. Italian, for example, only has individual names for 1-10, with eleven being undici (one and ten) and Spanish has names for 1-15 with 16 being dieciséis (ten and six). German uses *null* for 0, and the Romance languages seem to use some form of *zero*, perhaps accented, zéro in French. I haven't done a comprehensive search, however.

It may be that the names of these numbers derive from commercial considerations, early marketplaces/marketdays, for example, and so depend more on local culture. This is a bit distinct from their use in mathematics, which tends to be more uniform.

And note that English is a compound language with both Germanic and French roots and we take 1-12 from German, but 0 from French.

> **Comments:**
> **username_8**: This answer doesn't explain why Octal is important, it only talks about other base systems in general. Therefore I don't see its relevance to the question.  
> **username_7**: @RolandIllig, yes, perhaps. I intend to provide a bit of background on the larger issue as a service to classroom teachers.  

---

### Answer by username_1 on 2018-05-24. Score: 0

As a step toward learning binary or hexadecimal. Show that we use many number bases everyday: base 24 and 60 in a clock; base 7 and base 30ish in a calender; base 16 and 14 in weights (in US); base 12 and 3 in distance (US); etc.

Then introduce octal. Octal has an advantage that it is not too different to Denary (Decimal), and that it dose not introduce new symbols (like hexadecimal).

After octal, head toward binary, maybe brefly explore the idea of other bases, and ask how low can we go? Binary is the limit.

Then binary to octal, but look at how this does not fit will in to 8 bit bytes. What can we do about this. Base 4 or base 16. Base 4 does not help us much, but is used by DNA. Base 16 helps us reduce number of digits, but we need 6 more symbols (a-f).


---

