encode | decode | compress

> octal | base8 | 0755 <

// Octal - Convert between text and octal (base 8) representation

[UNIX]

Unix Systems

Commonly used for file permissions and escape sequences in Unix/Linux.

[COMPACT]

Space Efficient

More compact than binary, using only digits 0-7.

[ESCAPE]

Escape Sequences

Support for \nnn format used in many programming languages.

>> technical info

How Octal Works:

Octal (base 8) uses digits 0-7. Each octal digit represents exactly 3 bits. In computing, octal is often used for Unix file permissions (755 = rwxr-xr-x) and character escape sequences (\101 = 'A').

Examples:

'A' → 101 'Hello' → 110 145 154 154 157 chmod 755 → rwxr-xr-x

Why Use Octal:

  • >Unix file permissions
  • >Escape sequences
  • >Legacy systems
  • >Compact bit representation
  • >Character encoding

>> frequently asked questions

What is octal?

Octal is a base-8 number system using digits 0-7. Each octal digit represents exactly 3 bits, making it useful for representing binary data in a more compact form.

Why is octal used for Unix permissions?

Unix file permissions use 3 bits each for owner, group, and others (read=4, write=2, execute=1). Octal perfectly represents these 3-bit groups: 755 means rwx (7) for owner, r-x (5) for group and others.

What are octal escape sequences?

Octal escape sequences like \101 represent characters by their ASCII code in octal. They're used in many programming languages and tools to represent special or non-printable characters.

How does octal compare to hexadecimal?

Octal uses 8 symbols (0-7) and represents 3 bits per digit, while hexadecimal uses 16 symbols (0-F) and represents 4 bits per digit. Hex is more common today, but octal remains important for Unix systems.

Other Languages