Hex → decimal: multiply each digit by its weight and add. Hex weights are powers of 16: 1, 16, 256, 4096, 65,536. Remember that A–F stand for 10–15.
Decimal → hex: use repeated division by 16. Each remainder, 0 to 15, is one hex digit, starting from the right. Write remainders of 10–15 as A–F.
An alternative that's sometimes easier by hand is to go through binary: convert decimal to binary, then group into nibbles (binary hex conversion). For hex → decimal, the direct method is usually fastest.
Two checks that catch most errors:
- A hex number with no letters still isn't decimal: 36₁₆ = 3 × 16 + 6 = 54.
- Two hex digits never exceed FF₁₆ = 255, and three never exceed FFF₁₆ = 4095. If your answer is bigger, something went wrong.