The formula
each digit is worth its value times the base raised to its position
Where it comes from
In decimal we use ten symbols and each position is worth ten times the one before. In binary there are only two symbols and each position is worth double; in hexadecimal there are sixteen and each is worth sixteen times more. The number is the same, only the writing changes.
How to work it out by hand
- Number the positions from right to left starting at zero
- Multiply each digit by the base raised to its position
- Add the results: that is the value in decimal
- To go to another base, divide repeatedly and read the remainders backwards
What is worth knowing
Hexadecimal is used so widely in computing because each digit is exactly four bits, so a byte always takes two characters. That is why web colours have six digits: two per channel. And it is where the letters A to F come from, standing for the values 10 to 15.