Binary ↔ Octal Converter

Convert between binary (base 2) and octal (base 8) instantly

Octal was historically important in computing, particularly on early mainframe computers like the PDP-8 and Digital Equipment Corporation systems. While less common today than hex, octal is still used in file permissions (Unix/Linux chmod), some digital electronics, and certain programming contexts.

Loading calculator...

How It Works

1
Select your source number system (Binary or Octal) from the dropdown
2
Enter your number in the input field — conversion happens instantly
3
View the result in the target number system
4
Use the Swap button to reverse the conversion direction
5
Copy the result to your clipboard with one click
6
Clear the input to start a new conversion

The Binary-Octal Formula

How to convert between binary and octal

Formula

Octal = 3-bit binary chunks converted | Binary = each octal digit to 3-bit binary

Variables

3 bits = 1 octal digit

Grouping Rule

Every octal digit represents exactly 3 binary bits. This relationship (2³ = 8) makes octal a natural human-readable shorthand for binary.

Octal digits: 0-7

Octal Digits

Octal uses digits 0 through 7. It does not use 8 or 9, or any letters (unlike hexadecimal).

Binary chunking

Binary to Octal Conversion

Group binary digits into sets of 3 (from the right), convert each chunk to its octal digit. Add leading zeros to the leftmost group if needed to make 3 bits.

Note: Octal was once used extensively in early computing because 3 bits per digit made it a natural human-readable representation. Today, its primary real-world usage is in Unix/Linux file permissions (chmod 755).

Step-by-Step Example

Converting binary 111010 to octal

1

Write the binary number

Binary: 111 010

2

Split into groups of 3 bits from the right

First group: 111 | Second group: 010

3

Convert first group 111 to octal

111 binary = 4+2+1 = 7 octal

4

Convert second group 010 to octal

010 binary = 0+2+0 = 2 octal

5

Combine results

Binary 111010 = Octal 72

Reference Guide

unitvaluenote
Binary 000Octal 03 bits → 1 octal digit
Binary 001Octal 11 decimal
Binary 010Octal 22 decimal
Binary 011Octal 33 decimal
Binary 100Octal 44 decimal
Binary 101Octal 55 decimal
Binary 110Octal 66 decimal
Binary 111Octal 77 decimal

Understanding Octal

Where octal is used in real computing

📁 Unix/Linux File Permissions (chmod)

The most common modern use of octal is in Unix/Linux file permissions. chmod commands like 755, 644, 777 are octal numbers representing read/write/execute permissions for owner, group, and others.

Best for: chmod 755 means: owner=7 (rwx), group=5 (r-x), others=5 (r-x). chmod 644 means: owner=6 (rw-), group=4 (r--), others=4 (r--).

💾 Early Computer History (PDP-8, DEC)

Octal was the primary human-readable representation on many early computers, including the PDP-8 (from Digital Equipment Corporation), because 12-bit, 18-bit, and 36-bit words aligned perfectly with octal digits.

Best for: A 12-bit word is exactly 4 octal digits. This made octal natural for early machine code programming.

🔌 Digital Electronics

Octal can be useful in digital electronics when working with 3-bit groups, such as multiplexers, encoders, and some binary-coded decimal (BCD) applications.

Best for: 3-to-8 line decoders and 8-to-3 line encoders are naturally described using octal representation.

Advertisement

Where Octal Is Used Today

Octal (base 8) uses the digits 0-7. It was historically important in computing because many early computer architectures used 12-bit, 18-bit, or 36-bit word sizes — all multiples of 3, making octal representation perfect. The famous PDP-8 computer used 12-bit words, represented exactly as 4 octal digits. Today, octal's primary real-world usage is in Unix/Linux file permissions via the chmod command. When you see a permissions string like '-rwxr-xr-x' or a chmod command like '755', that 755 is octal: - 7 (111 binary) = read + write + execute - 5 (101 binary) = read + execute (no write) Octal is also used in: - Digital electronics (3-bit group encoding) - Some programming utilities (print formatting with octal escapes) - Historical computer documentation and legacy systems - Postgresql database permissions (GRANT statements use octal) While hex (16) has largely replaced octal as the standard human-readable binary representation (because 4 bits per digit aligns perfectly with the 8-bit byte), octal remains important in specific contexts, particularly system administration.

Key Features

Instant real-time conversion between binary and octal
Swap between binary → octal and octal → binary
Copy results to clipboard with one click
Support for large numbers
Input validation prevents invalid characters
Mobile responsive design

💡 Pro Tips

  • Memorise the 8 binary-to-octal pairs: 000=0, 001=1, 010=2, 011=3, 100=4, 101=5, 110=6, 111=7
  • Unix file permissions are octal: 7=rwx, 6=rw-, 5=r-x, 4=r--, 3=-wx, 2=-w-, 1=--x, 0=---
  • Common chmod examples: 755 = rwxr-xr-x (executable), 644 = rw-r--r-- (normal file), 777 = all permissions (caution)
  • Binary to octal grouping is always done in groups of 3 bits from the RIGHT (least significant bit)
  • Add leading zeros to the leftmost binary group if needed to make 3 bits
  • Some programming languages use a leading 0 to indicate octal (e.g., 0755 in C/JavaScript)

Common Mistakes

Entering digits 8 or 9 in octal input

Octal only uses digits 0-7. 8 and 9 are not valid octal digits and will trigger a validation error.

Grouping binary from the left instead of the right

Always group binary digits from the RIGHT (least significant bit) when converting to octal, not from the left. Add leading zeros to the leftmost group if needed.

Confusing octal with decimal

Octal numbers look like decimal numbers (0-7 only) but represent different values. 10 octal = 8 decimal, not 10 decimal. Our converter handles this correctly.

Research & Citations

All factual claims on this page are sourced from peer-reviewed research

  1. [1]

    The Open Group (2024). chmod — change file modes. POSIX Base Specifications.

    Official documentation for octal notation in Unix/Linux file permissions

    View source

This calculator is a reference tool and does not constitute medical advice. For personalised sleep health guidance, consult a qualified healthcare provider.

Last updated: January 10, 2025

C

Creators

CalcPool Team

Developer

Advertisement

Quick Facts

CategoryDigital
Total uses0
Last updated2025-01-10
Cost Free
Advertisement

Privacy Guaranteed

Your data never leaves your browser. All calculations are 100% private.

Frequently Asked Questions

How do I convert binary to octal?

Group binary digits into sets of 3 from the right, then convert each 3-bit group to its octal digit (0-7). For example, binary 111010 → groups 111 (7) and 010 (2) → octal 72.

How do I convert octal to binary?

Convert each octal digit to its 3-bit binary equivalent and concatenate. For example, octal 72 → 7 = 111, 2 = 010 → binary 111010.

What are file permissions in octal?

Unix/Linux file permissions are expressed in octal. chmod 755 means: owner (7 = rwx), group (5 = r-x), others (5 = r-x). 644 means owner read/write, group and others read-only.

Why do some programming languages use leading 0 for octal?

In C, C++, Java, JavaScript (strict mode), Python (version 2), a leading zero indicates octal. For example, 0755 = 755 octal = 493 decimal. However, modern JavaScript and Python 3 require 0o prefix (0o755).

Is octal still used today?

Yes, primarily for Unix/Linux file permissions (chmod). It is also used in some digital electronics contexts, PostgreSQL permissions, and legacy systems.

Advertisement