About hex to decimal converter
Hexadecimal uses 16 symbols: 0 to 9 and A to F, where A is 10 and F is 15. To convert, multiply each digit by a power of 16. For example 1F = 1 × 16 + 15 = 31.
Worked example
Convert the colour channel value C8. C is 12 and 8 is 8, so C8 = 12 × 16 + 8 = 200. A web colour like #FF8000 therefore has red 255, green 128 and blue 0. Two hex digits always cover 0 to 255, which is exactly one byte, and that is why web colours use pairs of hex digits.
How place values work
Each digit position is worth a power of the base. In decimal the places are 1, 10, 100, 1000 and so on. In binary they are 1, 2, 4, 8, 16, and in hexadecimal 1, 16, 256, 4096.
Why hexadecimal matters
- Computers store everything as binary; hexadecimal and octal are compact ways to write it.
- One hex digit equals exactly four binary digits, which is why programmers use it for colours, memory addresses and byte values.
- Octal groups three bits per digit and appears in Unix file permissions such as 755.
