Binary to Decimal Converter

Convert binary numbers (0s and 1s) to decimal with our step-by-step calculator. Learn the positional value method, see detailed examples, and understand how computers store numbers.

Calculation Steps

What is Octal?

Octal is a base-8 number system that uses eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. The name "octal" comes from the Latin word "octo" meaning eight. Unlike decimal (base-10) which is natural for humans, or binary (base-2) which is natural for computers, octal sits somewhere in between.

Octal was more popular in early computing because it provided a compact way to represent binary numbers. Each octal digit represents exactly three binary digits, making it easy to convert between binary and octal. While less common today, octal still has specific uses in computing.

Octal position values: ... 512 64 8 1

In octal, the rightmost position has value 1, then 8, then 64, then 512, and so on (each 8 times the previous value).

How to Convert Decimal to Octal

Converting decimal to octal uses the division-by-8 method, similar to the division-by-2 method for binary:

  1. Start with your decimal number - Let's convert 125 to octal as an example
  2. Divide by 8 - 125 ÷ 8 = 15 with remainder 5
  3. Write down the remainder - The remainder (5) becomes the rightmost digit
  4. Divide the quotient by 8 - Take 15 and divide by 8: 15 ÷ 8 = 1 remainder 7
  5. Write down this remainder - This becomes the next digit to the left
  6. Repeat until quotient is less than 8 - Keep dividing until the quotient is less than 8
  7. The last quotient becomes the leftmost digit - When the quotient is less than 8, it becomes the leftmost digit
  8. Read from bottom to top - The octal number is read from the last quotient to the first remainder

Complete example: Convert 125 to octal

125 ÷ 8 = 15 remainder 5

15 ÷ 8 = 1 remainder 7

1 is less than 8, so we stop here

Octal result: Read from last quotient to first remainder: 175

So 125 in decimal = 175 in octal

Our converter above shows you these steps for any number you enter.

Where is Octal Used Today?

While not as common as binary or hexadecimal, octal still has specific uses:

Common Decimal to Octal Conversions

Here are some common decimal numbers and their octal equivalents:

DecimalOctalWhat It Represents
00Zero in all bases
77Largest single octal digit
810First "carry" in octal
641008 squared (8²)
51210008 cubed (8³)
1012Decimal 10 in octal
100144One hundred in octal
255377Maximum 8-bit value in octal
7771411Not the same as decimal 777!

Octal File Permissions in Unix/Linux

The most practical use of octal today is in Unix/Linux file permissions. Each file has three sets of permissions:

Each set has three bits representing read (4), write (2), and execute (1). These are added together to make an octal digit:

PermissionValueMeaning
Read4Can read the file
Write2Can modify the file
Execute1Can run the file as a program

Example: Permission 755

7 (owner) = 4 + 2 + 1 = read, write, execute

5 (group) = 4 + 0 + 1 = read, no write, execute

5 (others) = 4 + 0 + 1 = read, no write, execute

So 755 means: Owner can do everything, group and others can read and execute

Octal vs. Other Number Systems

How does octal compare to other bases?

BaseDigitsProsCons
Binary (2)0, 1Natural for computers, simplestVery long numbers, hard for humans
Octal (8)0-7Compact, easy binary conversion (3 bits per digit)Less common today
Decimal (10)0-9Natural for humans, universalNo simple binary conversion
Hexadecimal (16)0-9, A-FVery compact, easy binary conversion (4 bits per digit)Uses letters, confusing at first

Octal's advantage is that it converts easily to binary (each octal digit = 3 binary digits), but hexadecimal is more compact (each hex digit = 4 binary digits).