Binary to octal converter

Enter a binary number to get its octal form, the notation used for example in Linux file permissions.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter binary number.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Split the bits into groups of 3 starting at the point, pad with zeros, then turn each group into one octal digit: 000 = 0 up to 111 = 7.

Example

Inputs: Binary number = 101010. Result: Result in octal: 52.

101010
52

Limits and caveats

  • Negative numbers keep a minus sign in front of the magnitude; they are not shown in two's complement.
  • Up to 2000 digits before the point and 200 after it.

Questions about this tool

Why are bits grouped in threes?

Because 8 = 2 to the power 3, each octal digit stands for exactly three bits.

How does this relate to Linux permissions?

Each rwx triple of bits becomes one octal digit, so 111 101 101 equals 755.

How are fractions handled?

Fraction bits are grouped in threes from the point to the right and padded with zeros, so 0.11 becomes 0.110 = 0.6 in octal.