- Octal Number System Definition: The octal number system is defined as a base-8 system using digits 0 to 7.
- Octal to Binary Conversion: Convert each octal digit to a three-bit binary number for the binary equivalent.
- Binary to Octal Conversion: Group binary digits in sets of three and convert each to its octal equivalent.
- Octal to Decimal Conversion: Expand the octal number in base-8 with positional weights to find the decimal equivalent.
- Decimal to Octal Conversion: Use repeated division by 8 and record the remainders to convert decimal to octal.
The octal number system is a positional base-8 system. It uses eight digits: 0, 1, 2, 3, 4, 5, 6 and 7. The smallest two-digit octal number is (10)8, which equals decimal 8.
A base subscript distinguishes an octal value such as (352)8 from the same digits in another number system. Programming languages can use other notation. Python, for example, writes an octal integer with the prefix 0o. Octal was widely used with early computers and remains a compact way to write binary patterns. Conversion between octal and the binary number system is direct because one octal digit represents exactly three bits.
The base is 8 = 23, so each octal digit has a three-bit binary equivalent.
One octal digit replaces each group of three binary bits. This makes an octal representation about one-third as long as the corresponding binary representation. As a positional system, octal uses powers of 8 as place weights. The integer weights are 1, 8, 64 and so on from right to left. Fractional positions use one-eighth, one-sixty-fourth and successively smaller powers of 8.
Number Conversion
Octal to Binary Conversion
Replace each octal digit with its three-bit binary equivalent. Keep the groups in the same order. For a fractional value, apply the same rule on both sides of the radix point.
Example
Convert (145.56)8 to binary:
Use the table to replace each digit: 1 becomes 001, 4 becomes 100, 5 becomes 101, 5 becomes 101 and 6 becomes 110.
The result is 001100101.101110 in base 2. Leading zeros in the integer part can be removed, giving 1100101.101110 in base 2.
Binary to Octal Conversion
Starting at the radix point, group the binary digits in sets of three. Move left through the integer part and right through any fractional part. Add zeros only at the outer ends when a group is incomplete, then replace each group with its octal digit.
Example
Find the octal equivalent of (11001111)2.
Group the bits from the right:
011, 001, 111. A leading zero completes the leftmost three-bit group without changing the value.
The groups 011, 001 and 111 correspond to 3, 1 and 7.
Therefore, the octal result is (317)8.
Octal to Decimal Conversion
Multiply each octal digit by its positional power of 8, then add the terms. The rightmost integer digit has weight 1, followed by weights 8, 64 and so on toward the left.
Example
Convert (317)8 to decimal.
The calculation is 3 × 64 + 1 × 8 + 7 × 1 = 192 + 8 + 7 = 207.
Decimal to Octal Conversion
For a non-negative integer, divide repeatedly by 8 and record each remainder. Read the remainders from last to first. This is the repeated-division method. The term double dabble refers to a different conversion algorithm.
Example
Find the octal equivalent of decimal 158.
The remainders, read from last to first, give (236)8.
For a decimal fraction, multiply the fractional part repeatedly by 8 and record each integer part in order.
For decimal 0.40:
The fractional remainders repeat, so the octal expansion does not terminate.
The exact recurring value is (0.3146…)8; a finite number of digits gives an approximation.
Advantages of Octal Number Systems
- Each octal digit represents three binary bits, so long bit patterns are shorter to read and write.
- Conversion between binary and octal uses direct three-bit grouping.
- Octal can make binary-coded values easier for people to check, compare and enter.
Disadvantages of Octal Number Systems
A disadvantage of the octal number system is that it is less familiar to most readers than decimal, while hexadecimal is now more common for compact binary notation. A computer still stores and processes the value as bits. Octal is a way to write that value, not a separate machine representation that requires an octal-to-binary circuit. Software must nevertheless know the intended base when it reads an octal string or literal.





