Binary
Binary is a base-2 number system which uses the digits 0 and 1. To convert from decimal to binary, the value should be broken up into powers of 2. For example:
2710 = 16 + 8 + 2 + 1
Then consider all the possible powers of 2. For each, if they were used, place a 1 in that column. Otherwise, a 0.
Therefore in the above example:
2710 = 110112
To convert a binary value back to decimal, identify which powers of two are assigned a 1, and add the values of these together. For example:
1011012 = 25 + 23 + 22 + 20 = 32 + 8 + 4 + 1 = 4510
Hexadecimal
Hexadecimal is a base 16 number system, using the digits 0-9 and the letters A-F. This means it can represent the values 0-15 with one character each. The process for converting to and from hexadecimal is the same, except that now we need to consider how many of each power of 16 there are. For example:
6410 = 4 x 16
Therefore 6410 = 4 x 161 + 0 x 160 = 4016
Converting from hexadecimal to decimal requires each power of 16 to be multiplied by its coefficient, with these added together. For example:
A4F16 = A x 162 + 4 x 161 + F x 160