Convert decimal to hexadecimal number
In this post, we will go through the detailed steps for converting a given number from decimal number system to it equivalent in the hexadecimal number system. Here we will only concentrate on conversion of integer decimal number and steps to convert fractional decimal to hexadecimal will be discussed in a separate post.
- Integer part of the given decimal number is successively divided by the radix(base) hexadecimal number system 16 until quotient becomes zero(0).
- The reminder obtained for each division, becomes a digit in the hexadecimal number.
- The remainders obtained at each division step are assigned weights in the hexadecimal system in the decreasing order starting from the remainder obtained in the last division step to the remainder obtained in the first division step.
- The reminder in the last division iteration has the highest weight (MSD) which becomes the left most digit and the reminder obtained in the first division iteration has the lowest weight (LSD) which becomes the right most digit in the hexadecimal number.
- The procedure is illustrated in the example below:
Ex1: Convert (5049)10 decimal number to octal number (?)16 using successive division method
1st Division Iteration
Divide 5049 by 16
5049 ÷ 16 = 315(Quotient) Reminder=9
2nd Division Iteration
Divide 315 by 16
3rd Division Iteration
Divide 19 by 16
4th Division Iteration
Divide 1 by 16
Remainder from the last division iteration (1) becomes MSD and reminder from 1st iteration (9) becomes LSD.
Hence, the hexadecimal equivalent of the decimal number 5049 is (13B9).