Lelifi·tools

Binary to Octal Converter

Group the bits of 110101110 in threes from the right, 110 101 110, and each group becomes one octal digit: 656. This page converts in both directions, prints the decimal and hex values alongside, and pads or checks the groups for you.

Type a binary number to get its octal value, with the 3-bit groups, decimal and hex shown so you can check every digit.

By the Lelifi editors ·

Key takeaways

Three bits make one octal digitSplit 110101110 into groups of three, starting from the right110101110656read down656 in octalsame value as 110101110 in binary, which is 430 in decimal
Each group of three bits becomes one octal digit by direct lookup.
Reading 656 in octal place values6 x 64 = 3845 x 8 = 406 x 1 = 6384 + 40 + 6 = 430Octal places go up by 8 each step: 1, 8, 64, 512, 4096Place512 64 8 1Digitblank 6 5 6
Octal place values double up by 8, so 656 means 384 + 40 + 6.
On this page
  1. What the octal system is
  2. Why three bits make one octal digit
  3. Converting binary to octal step by step
  4. Going the other way: octal to binary
  5. Binary, octal and decimal side by side
  6. File permissions: where you meet octal most
  7. Mistakes to watch for
  8. Octal or hex: picking the right base

What the octal system is

Octal is base 8. It uses eight digits, 0 through 7, and every place moving left is worth eight times the place before it: 1, 8, 64, 512, 4096. The octal number 656 breaks down as 6 x 64 + 5 x 8 + 6 = 384 + 40 + 6 = 430 in decimal. That is the whole system. There is no sign bit to worry about and no hidden convention; an octal digit is a small number from 0 to 7 and nothing more.

Octal earned its place in computing history because it packs bits neatly. Early machines such as the PDP-8 with its 12-bit word and the IBM 7090 with its 36-bit word split evenly into 3-bit groups, so an engineer could read a whole word register as 4 or 12 octal digits without doing any arithmetic. Desktop machines settled on 8-bit bytes, which hexadecimal covers in exactly two digits, and octal retreated to the corners where 3-bit fields still rule. Those corners are real: Unix file permissions, the mode word returned by the stat system call, and the four-digit squawk code a pilot dials into an aircraft transponder are all written in octal to this day.

Why three bits make one octal digit

Three bits can be arranged in 2 x 2 x 2 = 8 different ways, from 000 up to 111. Eight patterns, eight octal digits: the match is exact. That is why the conversion never involves arithmetic at the digit level. Each group of three bits maps to one digit by lookup, and no group ever carries into its neighbor. Hexadecimal works the same trick with four bits, since 2 x 2 x 2 x 2 = 16, but three is the size that octal uses.

The complete lookup table is short enough to memorize:

Binary groupOctal digitBinary groupOctal digit
00001004
00111015
01021106
01131117

If you know this table, you can convert in your head. Reading long binary strings is where it pays off: a 24-bit color value is 8 octal digits, and a 9-bit register is 3, while the same values in binary run 24 and 9 characters with no visible structure.

Converting binary to octal step by step

The method has three moves. First, split the binary number into groups of three, starting from the right end. Second, pad the leftmost group with leading zeros if it has fewer than three bits; the padding changes nothing about the value. Third, read each group off the table above and join the digits.

Take 110101110, which the calculator above converts in one pass:

StepWorkResult
Split into threes from the right110 | 101 | 110three groups
Read each group as a digit110 is 6, 101 is 5, 110 is 66, 5, 6
Join the digits left to right6, then 5, then 6656
Check in decimal6 x 64 + 5 x 8 + 6 = 384 + 40 + 6 = 430matches the binary value 430

Shorter numbers need padding. The binary number 1011110 has seven bits, so the leftmost group gets two zeros: 001 011 110, which reads as 1, 3, 6 and gives 136 in octal. The decimal check confirms it: 1 x 64 + 3 x 8 + 6 = 64 + 24 + 6 = 94, and the binary places 64 + 16 + 8 + 4 + 2 also total 94. Nothing was rounded or estimated; the grouping is lossless in both directions.

Going the other way: octal to binary

Reverse the lookup. Expand every octal digit into exactly three bits and concatenate the results. The octal number 745 becomes 111, 100, 101, which joins into 111100101 in binary. Both readings describe the same quantity: 7 x 64 + 4 x 8 + 5 = 448 + 32 + 5 = 485 in octal, and 256 + 128 + 64 + 32 + 4 + 1 = 485 from the binary places.

Always write all three bits per digit, including interior zeros. The octal number 205 expands to 010 000 101, not 10 0 101. Dropping the middle zeros is the single most common error in this direction, and it silently produces a different number: 100101 in binary is 37, not 133, which is the true value of 205. The calculator keeps the three-bit width and shows the expansion so you can see each digit's contribution.

Binary, octal and decimal side by side

It helps to see a run of small values in all three systems at once. Notice how octal digit counts grow a little faster than hex but much slower than binary, and how every power of two lands on a tidy octal number:

DecimalBinaryOctalHex
510155
81000108
2611010321A
64100000010040
9410111101365E
25511111111377FF
4301101011106561AE

The 255 row is worth a second look. Eight set bits fill one byte, and in octal that byte is 377: three digits covering three groups of three, with the top group padded to 011. Hex reads the same byte as FF, two digits of four bits each. Neither is more correct; they slice the same bits at different widths.

File permissions: where you meet octal most

On Linux and macOS, the chmod command takes a three-digit octal number and sets who can read, write and execute a file. Each digit covers one audience: owner, group, and everyone else. Inside a digit, read counts 4, write counts 2, and execute counts 1, so the digits add up:

Octal digitBinaryLettersMeaning
7111rwxread, write and execute
6110rw-read and write, no execute
5101r-xread and execute, no write
4100r--read only
0000---no access at all

So chmod 755 script.sh gives the owner full control (7 = 4 + 2 + 1) and everyone else read and execute (5 = 4 + 1). The everyday pair is 755 for programs and directories, 644 for data files the owner edits and others only read. The GNU coreutils manual documents the full scheme, and the POSIX chmod specification defines the octal format that every Unix-like system follows.

Why octal here and not hex? Each permission triple is exactly three bits, one bit per right. Octal digits slice the 9-bit owner-group-other block into three clean pieces; hex would slice at four and split a permission group across two digits.

Mistakes to watch for

Four errors cover most bad conversions. Grouping from the left instead of the right is the first: 110101110 must split as 110 | 101 | 110, and grouping left to right gives 110 | 101 | 110 only by luck; try 1011110 and the wrong direction yields 101 | 111 | 0, which is nonsense. The right end is fixed because the place values count up from 1 on the right.

Second, forgetting to pad the leftmost group. Without padding, 1011110 looks like groups of 101, 111 and a lone 0, and people drop the lone bit. Pad to 001 and the answer falls out cleanly as 136.

Third, feeding in digits an octal number cannot contain. Base 8 has no 8 and no 9; an input like 278 is not octal, and treating it as one gives wrong results all the way down. The same trap runs in reverse when you type a 2, 3, 4, 5, 6, 7, 8 or 9 into a binary field.

Fourth, mixing the group sizes. Hexadecimal groups four bits, octal groups three. If you convert 11111111 by threes you get 377; by fours you get F7 plus a stray 1111. A quick sanity check catches this: 255 in decimal matches 377 in octal and FF in hex, and the calculator prints both so a slip shows up immediately.

Octal or hex: picking the right base

Hex wins wherever bytes are the natural unit: memory dumps, color codes, MAC addresses, file signatures. Two hex digits describe one byte exactly, and bytes are how modern hardware counts.

Octal wins wherever 3-bit fields are natural. File permissions are the big one, as shown above. Aviation transponder codes are four octal digits, giving 4 x 4 x 4 x 4 = 256 possible squawks, because each digit is dialed with a wheel that steps 0 through 7. Some programming languages still honor a leading zero as an octal marker, so 0755 in C source means 493 in decimal, a detail that has surprised more than one beginner.

For everything else the two bases coexist happily, and converting between them runs through binary in both directions: regroup the bits from threes to fours and re-read the table. The calculator above keeps decimal and hex on screen next to the octal answer for exactly that reason.

Frequently asked questions

What is 110101110 in octal?

656. Split the bits from the right into 110, 101 and 110, which read as 6, 5 and 6. The decimal check is 6 x 64 + 5 x 8 + 6 = 430, matching the binary value.

How do I convert binary to octal by hand?

Group the bits in threes from the right, pad the leftmost group with zeros, then translate each group: 000 to 0, 001 to 1, 010 to 2, up to 111 to 7. Join the digits and you are done.

Why does one octal digit equal exactly three bits?

Because 2 x 2 x 2 = 8. Three bits form eight distinct patterns and octal has eight digits, so the mapping is one to one with no arithmetic needed.

What is 1011110 in octal?

136. Pad to 001 011 110 and read 1, 3, 6. In decimal that is 1 x 64 + 3 x 8 + 6 = 94, which matches the binary places 64 + 16 + 8 + 4 + 2.

What does 755 mean in chmod?

Owner gets 7 (read, write, execute), group gets 5 (read, execute) and others get 5 (read, execute). Each digit is a 3-bit field where read is 4, write is 2 and execute is 1.

Can an octal number contain the digit 8 or 9?

No. Base 8 runs from 0 to 7. If you see an 8 or 9 in what claims to be an octal number, it is decimal or a typo, and converting it as octal will give a wrong answer.

What is 11111111 in octal?

377. The eight bits group as 011, 111 and 111, which read as 3, 7 and 7. The same value is 255 in decimal and FF in hex.

How do I convert octal back to binary?

Expand each octal digit into three bits and join them: 745 becomes 111 100 101, or 111100101. Keep interior zeros, since dropping them changes the value.

Which is better, octal or hexadecimal?

Hex for byte-oriented work like memory dumps and color codes, since two hex digits cover one byte. Octal for 3-bit fields such as Unix file permissions and aviation transponder codes.

What is 377 in decimal?

255. Reading the octal places, 3 x 64 + 7 x 8 + 7 = 192 + 56 + 7 = 255, which is also the largest value one byte can hold.

Why does a leading zero make a number octal in C?

The C language treats a literal starting with 0 as octal, so 0755 means 493 in decimal. Write 755 without the zero and you get plain decimal, a difference that has caused real bugs.

How many octal digits do I need for 16 bits?

Six, with two bits left over. Six digits cover 18 bits, so a 16-bit value pads to six octal digits, for example 65535 in decimal is 177777 in octal.

What is 1000000 in binary as an octal number?

100. One million in binary (64 in decimal) is seven bits, which group as 001, 000 and 000, reading as 1, 0, 0. Powers of two always end in a clean octal round number.

Do fractional binary numbers convert to octal the same way?

Yes, but the grouping mirrors around the point. Bits left of the point group in threes from the point going left, and bits right of the point group in threes going right, so 101.101 is 5.5 in octal.

Spotted a wrong number or a broken result?

More Developer tools

See all Developer tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.