Number bases in simple words
We normally count in base 10. That means we use ten digits, 0 to 9, and each place is worth 10 times the place to its right: ones, tens, hundreds.
Other bases work the same way with a different number. Binary (base 2) uses only 0 and 1, and each place is worth 2 times the one before: 1, 2, 4, 8, 16. Hexadecimal (base 16) needs sixteen digits, so after 9 it uses letters: A = 10, B = 11, up to F = 15.
To read a number in any base, multiply each digit by what its place is worth and add. For example, hex 2A means 2 sixteens and 10 ones: 2 × 16 + 10 = 42. In binary, 101010 is 32 + 8 + 2 = 42 too.
To go the other way, keep dividing by the new base and write down the remainders. 42 ÷ 2 = 21 r 0, 21 ÷ 2 = 10 r 1, 10 ÷ 2 = 5 r 0, 5 ÷ 2 = 2 r 1, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1. Reading the remainders from bottom to top gives 101010.
Formula and method
Each digit contributes its value multiplied by a power of the input base. Repeated division expresses the same integer in another base.
Worked example
Hexadecimal FF represents 15 × 16 + 15 = 255, equivalent to binary 11111111 and octal 377.