EncodeHub.onlineDeveloper Encoding Hub
Octal Guides

What Is Octal? Base-8 System Guide

Learn about the octal base-8 number system, digits 0-7, and Linux file permission usage.

EncodeHub Engineering Team 10 min read 2026-07-15

1. The Base-8 Numeral System

Octal is a base-8 positional numeral system that uses eight unique digits: 0, 1, 2, 3, 4, 5, 6, and 7. The digits 8 and 9 do not exist in octal. Each position in an octal number represents a power of 8: - 8^0 = 1 - 8^1 = 8 - 8^2 = 64 - 8^3 = 512

To convert an octal number to decimal, multiply each digit by its positional power of 8. For example, octal 147 represents: (1 * 8^2) + (4 * 8^1) + (7 * 8^0) = 64 + 32 + 7 = 103

2. The 3-Bit Connection with Binary

Just as hexadecimal aligns with 4-bit nibbles, octal aligns with 3-bit binary triplets (2^3 = 8). A single octal digit represents exactly 3 binary bits: - Octal 0 = Binary 000 - Octal 7 = Binary 111

To convert binary to octal, group bits in sets of three from right to left: - Binary: 110101 - Grouped: 110 (6) and 101 (5) - Octal: 65

3. Linux File Permissions (chmod 755 Explained)

The most common application of octal today is Unix/Linux file permissions. In Unix, permission settings are divided into three groups: Owner, Group, and Others. Each group has three permission flags: Read (r), Write (w), and Execute (x). - Read has a binary value of 2^2 = 4 (r = 4). - Write has a binary value of 2^1 = 2 (w = 2). - Execute has a binary value of 2^0 = 1 (x = 1).

By summing these values, a permission set is written as a single octal digit (0 to 7): - 7 (4+2+1) = Read, Write, and Execute (rwx). - 5 (4+0+1) = Read and Execute (r-x). - 4 (4+0+0) = Read only (r--).

Therefore, the Unix command 'chmod 755 file.txt' sets the owner permissions to 7 (rwx), the group permissions to 5 (r-x), and others to 5 (r-x).

Put Knowledge Into Practice

Try our interactive Binary to Decimal Converter or Binary Calculator with live step-by-step calculations.

Launch Binary Converter