# Octal Anonymous contributor Anonymous contributor
Published Mar 7, 2023
Contribute to Docs

The octal number system is a base-8 number system that uses digits from 0-7 to represent any number. Octal is a number system similar to other number systems like binary and hexadecimal.

Octal was often used because machines were based on 12, 24, or 36 bits. In contrast, binary or hexadecimal are commonly used in modern technologies, especially with 16, 32, or 64-bit machines. The octal number system has an advantage over the hexadecimal system in that characters from the alphabet are not used to express a number in octal.

## Example

octal decimal
0 0
1 1
2 2
3 3
7 7
10 8
11 9
12 10
20 16
40 32
100 64

Each digit corresponds to a power of 8. The last digit (decimal 0-7) is 80, equalling 1. The one in front of it is 81, and so on. So each digit represents the figure times 8 to the power of its position. An octal number is converted to decimal like so (using octal 125 as an example):

125 = 1 * 82 + 2 * 81 + 5 * 80 = 64 + 16 + 5 = 85