How it works
Enter a whole number and read it in the three bases programmers live in: binary for bits and flags, hexadecimal for colors, memory and byte values, octal for file permissions. Each hexadecimal digit packs exactly four bits, which is why developers read hex as compressed binary.
Formula
Hex: the same with 16, where digits 10 to 15 are written A to F.
Octal: the same with 8.
Example
Example in plain words. The year 2026.
Binary: 11111101010.
Hexadecimal: 7EA, since 7 x 256 + 14 x 16 + 10 = 2026.
Octal: 3752.
Frequently asked questions
Why do colors use hex?
A color channel is one byte, 0 to 255, which is exactly two hex digits: FF is 255. Six digits pack a whole color.
Where does octal still appear?
Unix file permissions: 755 means full rights for the owner, read and execute for the rest, one octal digit per group of three bits.