CHAPTER FIVE

NUMBER BASES

5.1.4.2. How to convert Decimal to Hexadecimal

You can use the repeated division method you used for converting decimal-to-binary to convert decimal to hex. Only, that, you have to use hexadecimal's base number 16 instead of 2.

Example 1- Convert decimal no 97 to hex

To convert decimal no 97 to hex divide the number repeated by 16. Keep the remainders.

97 / 16 = 6 - remainder 1
6 / 16 = 0 - remainder 6

Collect remainders from bottom (LSB) to  up (MSB)

The hex equivalent of decimal number 97 is 61

Example 2- Decimal Number: 934

To convert decimal no 934 to hex divide the number repeated by 16. Keep the remainders.

934 / 16 = 58 - remainder 6
58 / 16 = 3 - remainder 10
3 / 16 = 0 - remainder 3

Check for the hex value of 10 from the hex table. 10 in decimal is A in hex.
(Please always remember that whenever the decimal value is more than 9 look for the hex equivalent from the Hex table)

Collect remainders from bottom (LSB) to up (MSB)

The hex equivalent of decimal number 934 is 3A6

Page 44 Page 44 Page 45

Copyright@2015. Digital Vision Digital Content Development Unit. www.digitalvision.net.ng