 # Decimal To Hex Conversion

In decimal to hex conversion, we learn to convert a decimal number into its equivalent hexadecimal number system or we can say the conversion of base 2 number to base 16 number.

In the number system, we have learned about binary numbers, decimal numbers, octal numbers and hexadecimal numbers. All these numbers have different bases such as binary has base 2, decimal has base 10, octal has base 8 and hex has base 16. These numbers can be converted into other number systems by following the methods or procedure. Here we are going to convert a decimal number into a hexadecimal number.

The conversion of decimal numbers to hexadecimal numbers is a very easy task. It can be done with the help of a conversion table. If one memorizes this table, he/she can easily convert a decimal number to hexadecimal number. For the decimal numbers from 1 to 15, there is an equivalent hexadecimal number. But how to convert the decimal number if it is more than 15. Then we need to follow a different procedure.

If any given number is more than 15, then we have to divide the decimal number by 16 and consider the remainder to get the equivalent hexadecimal number. The complete procedure we have explained here step by step. But before learning the steps let us see the table, where for each value of the decimal number from 0 to 15, there is an equivalent hexadecimal number given.

To convert the decimal number system to hex, students have to remember the table given below, to solve the problems in a quick way.

 Decimal Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Equivalent Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F

## Decimal to Hexadecimal Conversion With Steps

To convert a decimal number into hex follow the below-given, steps;

• First, divide the decimal number by 16, considering the number as an integer.
• Keep aside the remainder left.
• Again divide the quotient by 16 and repeat till you get the quotient value equal to zero.
• Now take the values of the remainder’s left in the reverse order to get the hexadecimal numbers.

Note: Remember, from 0 to 9, the numbers will be counted as the same in the decimal system. But from 10 to 15, they are expressed in alphabetical order such as A, B, C, D, E, F and so on.

Let us take an example to understand the steps given above for decimal to hex conversion.

Solution: Following the step,

• First, divide 960 by 16.

960 ÷ 16 = 60 and remainder = 0

• Again, divide quotient 60 by 16.

60 ÷ 16 = 3 and remainder 12.

• Again dividing 3 by 16, will leave quotient=0 and remainder = 3.
• Now taking the remainder in reverse order and substituting the equivalent hexadecimal value for them, we get,

3→3, 12→C and 0→0

Therefore, (960)10 = (3C0)16

This example must have made you understand the conversion method of decimal to hex. Let us solve a few more examples to get a good practice over it.

### Decimal to Hex Converter

Apart from these conversion tables and steps, we can use the decimal to hex converter to make the conversion quick and easy. This converter will help you convert the given decimal number system of numbers to hexadecimal numbers.

Also, below solved examples help in understanding the conversion in a better way.

## Decimal to Hexadecimal Example Problems

Problem 1: Convert decimal number 49 into hexadecimal.

Solution: Let us create a table to solve the problem.

 Divide by 16 Quotient Remainder Hex Value 49 ÷ 16 3 1 1 3 ÷ 16 0 3 3

Therefore, 4910 = 3116.

Problem 2: Convert 122810 into hex.

Solution:

 Divide by 16 Quotient Remainder Hex Value 1228 ÷ 16 76 12 C 76 ÷ 16 4 12 C 4 ÷ 16 0 4 4

Therefore, 122810 = 4CC16

Problem 3: Convert 60010 into hexadecimal number.

Solution:

 Divide by 16 Quotient Remainder Hex Value 600 ÷ 16 37 8 8 37 ÷ 16 2 5 5 2 ÷ 16 0 2 2

Therefore, 60010 = 25816

Download BYJU’S – The Learning App and experience advanced learning methods with the help of personalised videos and pictures.