The shortcut
Octal and binary line up neatly because 8 is 2 to the power 3. Each octal digit is exactly three binary digits, so you can convert without any arithmetic.
Octal to binary
Replace each octal digit with its three-bit pattern:
- 0 = 000
- 1 = 001
- 2 = 010
- 3 = 011
- 4 = 100
- 5 = 101
- 6 = 110
- 7 = 111
For example, octal 755 becomes 111 101 101, which is 111101101.
Binary to octal
Group the bits in threes starting from the right, adding zeros on the left if needed, then replace each group by its digit. Binary 11110101 becomes 011 110 101, which is octal 365.
Why this matters
Octal was popular on machines with word sizes that were multiples of three bits, and it is still used for Unix permissions, where each digit holds the three read, write and execute bits.
Using the tool
Choose a direction, type your number, and read the result along with the grouping table. Leading zeros are removed from the result unless you untick the option. For a decimal value as well, use the octal converter, or see octal to decimal.