Developer Bases

Octal to decimal

Octal value
Decimal 493
Each place is a power of eight
The same number elsewhere
Binary 111101101
Binary, grouped 0001 1110 1101
Octal 755
Hexadecimal 1ED
Bits needed 9
Note
One octal digit = three bits
DecimalBinaryOctalHex
0000
1111
81000108
10101012A
15111117F
16100002010
64100000010040
100110010014464
25511111111377FF
256100000000400100
1024100000000002000400
655351111111111111111177777FFFF

Unix permissions come in groups of three bits — read, write, execute — for owner, group and others. Three bits is exactly one octal digit, so 755 reads directly as 111 101 101: full permissions for the owner, read and execute for everyone else. Written in decimal it would be 493, which tells you nothing.

Advertisement
320 × 100

Octal is base 8, using digits 0 to 7. Each place is worth eight times the one to its right, so 755 is 7×64 + 5×8 + 5 = 493. One octal digit maps exactly onto three bits.

How to convert octal to decimal

1 Enter the octal value — an 0o prefix is accepted.
2 Read the decimal result.
3 The binary form shows the three-bit groups.
4 A digit of 8 or 9 is rejected, since octal has neither.

Octal survives mainly in Unix file permissions, where its three-bit grouping is genuinely the clearest notation available. Elsewhere it is largely historical: it suited machines with word sizes divisible by three, and lost to hexadecimal once the eight-bit byte became universal. The one modern trap is that a leading zero means octal in C and several languages derived from it, so 0755 is 493 rather than 755.

Questions

493. As permissions it means rwxr-xr-x.

Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING