gettoolz.app

Octal to binary converter

Convert octal numbers to binary — every octal digit becomes 3 bits. Exact at any size, with a worked example and a table of common values. Free, and computed in your browser.

Part of developer tools.

Base

Binary

10101101

Octal

255

Decimal

173

Hexadecimal

AD

Octal to binary table

DecimalOctalBinary
000
111
2210
3311
44100
55101
66110
77111
8101000
9111001
10121010
11131011
12141100
13151101
14161110
15171111
162010000
1001441100100
1271771111111
25537711111111
256400100000000
100017501111101000
1024200010000000000
4096100001000000000000
655351777771111111111111111
42949672953777777777711111111111111111111111111111111
1844674407370955161517777777777777777777771111111111111111111111111111111111111111111111111111111111111111

The last rows are the largest 32-bit and 64-bit unsigned values. The second is past the point where ordinary JavaScript numbers start rounding; the table and the converter above both compute with BigInt, so every digit is exact.

How to convert octal to binary

Replace each octal digit with its 3-bit binary value, keeping the leading zeros inside each group — octal 1 is 001, not 1 — and join the groups in order. For 255: 2 → 010, 5 → 101, 5 → 101, giving 010 101 101, which is 10101101 once the leading zeros are dropped. Nothing is carried from one digit to the next, so a long octal number converts as easily as a short one.

Octal and binary side by side

The largest 16-bit value is 177777 in octal and 1111111111111111 in binary: 6 digits against 16. Every octal digit is exactly 3 bits, so the lengths stay in a fixed ratio and any stretch of digits can be converted without looking at its neighbours. Binary is what bit masks, flags and subnet masks are reasoned in: a /24 network mask is twenty-four 1 bits followed by eight 0 bits, 255.255.255.0 once written in decimal. In JavaScript and Python source, 173 is written 0o255 in octal and 0b10101101 in binary. Paste a prefixed number into the converter and it switches to the matching base; a number with no prefix is read in the selected base — octal on this page.

Other conversions

Going the other way? Binary to octal converter.

Or open the full number base converter and see a number in all four bases at once.