Using the converter
Type a decimal number, like 493, and the octal appears straight away, with the division by 8 underneath. Numbers of any length work, negative ones too. Press swap to go from octal back to decimal.
How to convert decimal to octal
Divide by 8 and write down the remainder, then divide the answer by 8 again, until the answer is 0. Read the remainders from the last back up to the first.
For 493, 493 ÷ 8 = 61 remainder 5, then 61 ÷ 8 = 7 remainder 5, then 7 ÷ 8 = 0 remainder 7. Reading upwards gives 755, which is the chmod setting for a file everyone can read and run but only its owner can change.
Through binary instead
Since 8 is 2³, each octal digit is exactly three bits. If you have the number in binary, split the bits into threes from the right and turn each group into a digit from 0 to 7. 111 101 101 is 7, 5 and 5, which is 755 again.
Questions
What is 8 in octal?
10. One eight and no ones.
What is 100 in octal?
144. 100 ÷ 8 = 12 remainder 4, 12 ÷ 8 = 1 remainder 4, 1 ÷ 8 = 0 remainder 1, so reading upwards gives 144.
Why doesn't octal use 8 or 9?
Base 8 needs only eight digits, 0 to 7, the same way decimal needs only 0 to 9. Eight is written 10.
Decimal, binary, octal and hex from 0 to 32
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 17 | 10001 | 21 | 11 |
| 18 | 10010 | 22 | 12 |
| 19 | 10011 | 23 | 13 |
| 20 | 10100 | 24 | 14 |
| 21 | 10101 | 25 | 15 |
| 22 | 10110 | 26 | 16 |
| 23 | 10111 | 27 | 17 |
| 24 | 11000 | 30 | 18 |
| 25 | 11001 | 31 | 19 |
| 26 | 11010 | 32 | 1A |
| 27 | 11011 | 33 | 1B |
| 28 | 11100 | 34 | 1C |
| 29 | 11101 | 35 | 1D |
| 30 | 11110 | 36 | 1E |
| 31 | 11111 | 37 | 1F |
| 32 | 100000 | 40 | 20 |
Decimal, binary, octal and hex from 0 to 32stringmash.com/decimal-to-octal
Sources
Added and reviewed . What's new






