Octal to decimal
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
| 65535 | 1111111111111111 | 177777 | FFFF |
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.
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
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.