18 min read
Binary and Octal
One octal digit is exactly three bits. Group bits in threes from the right — padding with leading zeros — to convert quickly.
Why Groups of Three?
8 = 2³. So every octal digit (0–7) can be written as exactly three bits, from 000 to 111. This makes binary ↔ octal conversion fast — no division needed.
| Octal digits as 3-bit groups | |
|---|---|
Binary to Octal
- Split the bits into groups of three, starting from the right.
- If the left-most group has fewer than three bits, add zeros on the left (leading zeros). They do not change the value.
- Change each group into one octal digit.
Octal to Binary
Do the reverse: write each octal digit as three bits, then join them. You may drop leading zeros at the very start of the answer.
Number base converter
FromNumberTo
Binary (2)
11010110
Octal (8)
326
Decimal (10)
214
Hex (16)
D6
Working: multiply each digit by its place value, then add
| Digit | Place value | Digit × place value |
|---|---|---|
| 1 | 27 = 128 | 1 × 128 = 128 |
| 1 | 26 = 64 | 1 × 64 = 64 |
| 0 | 25 = 32 | 0 × 32 = 0 |
| 1 | 24 = 16 | 1 × 16 = 16 |
| 0 | 23 = 8 | 0 × 8 = 0 |
| 1 | 22 = 4 | 1 × 4 = 4 |
| 1 | 21 = 2 | 1 × 2 = 2 |
| 0 | 20 = 1 | 0 × 1 = 0 |
128 + 64 + 0 + 16 + 0 + 4 + 2 + 0 = 214
Answer: 110101102 = 21410
Try it: Set To to Octal to see the grouping and padding. Then set From to Octal and To to Binary.
Practice
How many leading zeros must you add to 1011011₂ before grouping it in threes?
More lessons in Number Systems · Next: Binary and Hexadecimal · Previous: Decimal to Binary, Octal and Hexadecimal
