In what situations is octal base used?

I've seen binary and hex used quite often but never octal. Yet octal has it's own convention for being used in some languages (ie, a leading 0 indicating octal base). When is octal used? What are some typical situations when one would use octal or octal would be easier to reason about? Or is it merely a matter of taste?


Octal is used when the number of bits in one word is a multiple of 3, or if the grouping of the bits makes sense to notate in groups of 3. Examples are

  • ancient systems with 18bit word sizes (mostly historical)
  • systems with 9bit bytes (mostly historical)
  • unix file permissions with 9bits (3*3bits, "rwxr-x---" 0750)
  • unix file permissions with 12bits (the same as the 9bit version but adding three bits in front for setuid, setgid, and sticky, 01777 but the letters are more complicated here)

I have not encountered any uses of octal other than unix file permission bits during my about 25 years in IT.

If the number of bits in your word is a multiple of 4, however, please do use hex, by all means.


Octal is used as a shorthand for representing file permissions on UNIX systems. For example, file mode rwxr-xr-x would be 0755.