In what situations is octal base used?

Bob picture Bob · Apr 9, 2010 · Viewed 19.3k times · Source

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?

Answer

ndim picture ndim · Apr 9, 2010

Octal is used when the number of bits in one word is a multiple of 3. Examples are ancient systems with 18bit word sizes, systems with 9bit bytes, or unix file permissions with 9bits or 12bits.

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