Decimal to Hexadecimal

We can use a similar division method to the one we used with binary to convert from base 10 to base 2.

Using the same number (141)we have:

  1. 141 divided by 16 is 8 remainder 13
  2. 8 divided by 16 is 0 remainder 8

This gives the hexadecimal digits [8][13] which we can express in hex as 8D16.

If you are using a calculator the remainder can be calculated using the following method:

  1. Perform the division: 141/16 = 8.8125
  2. Subtract the whole number: 8.8125 – 8 = 0.8125
  3. Multiply by 16: 0.8125 x 16 = 13

Our remainder is therefore 13.

Another example: Try converting the number 951 to base 16.

  1. 951 divided by 16 is 59 remainder 7
  2. 59 divide by 16 is 3 remainder 11
  3. 3 divided by 16 is 0 remainder 3

This gives us an answer of [3][11][7] or 3B7.

Next: Hexadecimal to Decimal