Number Base ConverterConverters
Any base from 2 to 36, with binary, octal, decimal, and hex.
Octal digits run from 0 to 7, and each place is worth eight times the one to its right. Multiply each digit by its place value, add them up, and 755 becomes 493.
Octal is base 8. You meet it mostly in Unix file permissions such as 755 and 644, in a few older file formats, and in programming exercises. Read 755 as a decimal number and you get the wrong value. In octal it is 7 × 64 + 5 × 8 + 5, which is 493.
The mistake also runs the other way. A script that expects a permission in octal does something odd when it is given 493, and a value written with a leading zero, such as 0755, is read as octal by some programming languages.
The Number Base Converter moves a number between any two bases from 2 to 36 and always shows binary, octal, decimal, and hex side by side. Set From to 8 and To to 10, or type the number with the 0o prefix. It handles whole numbers of any length with BigInt, and fractions too.
The Decimal to Binary Converter is useful for a second check. Each octal digit stands for exactly three bits, so 755 in octal is 111 101 101 in binary. Type 493 into the converter and it gives 111101101, the same bits.
15. 1 × 8 + 7 = 15.
255, the largest value that fits in one byte.
493, when 755 is read as octal. Unix permissions are written in octal, one digit per permission group.
Divide by 8 again and again and read the remainders from last to first. 493 gives 755.
Tools used in this guide
Any base from 2 to 36, with binary, octal, decimal, and hex.
Decimal numbers to binary, with two's complement.