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.
| Octal | |
| Decimal | |
| Hexadecimal | |
| 3-bit groups |
All conversion runs in your browser; nothing you type is uploaded anywhere.
Type a binary number to get its octal value, with the 3-bit groups, decimal and hex shown so you can check every digit.
Key takeaways
- Each octal digit stands for exactly three bits, so 111 reads as 7 and 000 reads as 0
- 110101110 groups as 110 101 110, which comes out as 656 in octal and 430 in decimal
- Group from the right and pad the leftmost group: 1011110 becomes 001 011 110, or 136 in octal
- Unix permissions are octal: chmod 755 means the owner can read, write and execute, others can read and execute
- Hex slices bits in fours, octal in threes, so 255 in decimal is FF in hex and 377 in octal
On this page
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 group | Octal digit | Binary group | Octal digit |
|---|---|---|---|
| 000 | 0 | 100 | 4 |
| 001 | 1 | 101 | 5 |
| 010 | 2 | 110 | 6 |
| 011 | 3 | 111 | 7 |
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:
| Step | Work | Result |
|---|---|---|
| Split into threes from the right | 110 | 101 | 110 | three groups |
| Read each group as a digit | 110 is 6, 101 is 5, 110 is 6 | 6, 5, 6 |
| Join the digits left to right | 6, then 5, then 6 | 656 |
| Check in decimal | 6 x 64 + 5 x 8 + 6 = 384 + 40 + 6 = 430 | matches 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:
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 5 | 101 | 5 | 5 |
| 8 | 1000 | 10 | 8 |
| 26 | 11010 | 32 | 1A |
| 64 | 1000000 | 100 | 40 |
| 94 | 1011110 | 136 | 5E |
| 255 | 11111111 | 377 | FF |
| 430 | 110101110 | 656 | 1AE |
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 digit | Binary | Letters | Meaning |
|---|---|---|---|
| 7 | 111 | rwx | read, write and execute |
| 6 | 110 | rw- | read and write, no execute |
| 5 | 101 | r-x | read and execute, no write |
| 4 | 100 | r-- | read only |
| 0 | 000 | --- | 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
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.