Base Converter guide
How to Convert Decimal to Octal
To convert decimal to octal, divide by 8 repeatedly and read the remainders from the bottom up. For 214: 214 ÷ 8 is 26 remainder 6, 26 ÷ 8 is 3 remainder 2, and 3 ÷ 8 is 0 remainder 3 — giving 326.
What octal is
Octal is base 8, so it uses only the digits 0 to 7. There is no 8 and no 9 — after 7 comes 10, which in octal means eight.
Its place values go 1, 8, 64, 512, each one eight times the last.
You meet it less often than hex these days, but it is still standard for Unix file permissions, which is where most people encounter it.
Method 1 — repeated division by 8
| Divide | Result | Remainder |
|---|---|---|
| 214 ÷ 8 | 26 | 6 |
| 26 ÷ 8 | 3 | 2 |
| 3 ÷ 8 | 0 | 3 |
Reading it off
Reading the remainders from the bottom up: 326.
This is the same procedure as converting to binary — the only change is dividing by 8 rather than 2. That is worth noticing, because it means one method covers every base: divide repeatedly by the base you want, then read the remainders upward.
You can check it by converting back. 326 in octal is (3 × 64) + (2 × 8) + (6 × 1) = 192 + 16 + 6 = 214. Correct.
Method 2 — via binary, in groups of three
If you already have the binary, this is much faster. Because 8 is 2 to the power of 3, one octal digit is exactly three binary digits.
214 in binary is 11010110. Split into groups of three from the right: 11, 010, 110. Pad the leftmost to 011.
011 is 3, 010 is 2, 110 is 6. So 326. Same answer, no division at all.
Where you actually meet octal
Unix and Linux file permissions are the main place. When you type chmod 755, those three digits are octal.
Each digit covers one group — owner, group, others — and each is built from three bits: read (4), write (2), execute (1). So 7 is 4+2+1, all three permissions. 5 is 4+1, read and execute but not write.
That is why permissions use octal rather than hex. Three permission bits per group map onto exactly one octal digit, so the numbers line up with the concept.