 # 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.

Before getting started with converting decimal numbers to hexadecimal numbers, first, understand the meaning of decimal number system and hexadecimal number system.

What is Decimal number system?

The decimal numeral system is the most commonly used and the standard number system in everyday life. The base of this number system is 10 and is also called a radix. Hence, it has ten symbols, more precisely the numbers from 0 to 9, i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.

What is a Hexadecimal number system?

The hexadecimal number system, or simply Hex, is one of the important number systems in maths. The base or radix of this number system is 16. Being a base-16 numeral system, it uses 16 symbols. These include 10 decimal digits, i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and the first six letters of the English alphabet, i.e. A, B, C, D, E, F. However, these letters are used to represent the values 10, 11, 12, 13, 14 and 15 respectively in one single figure.

Let’s have a look at the conversion of decimal to hex and examples to understand in a better way.

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 a 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.
• 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 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 a 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

### Practice Problems

1. Convert the decimal number 1542 to the hexadecimal number.
2. What is the hexadecimal equivalent of the decimal number (175)10?
3. Convert the following decimal numbers to hex.
(i) 205             (ii) 450         (iii) 199            (iv) 3000

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

## Frequently Asked Questions – FAQs

### How do you convert from decimal to hexadecimal?

If the given decimal number is less than or equal to 15, then we can directly write the corresponding symbols of the hexadecimal number system. For example, the hexadecimal equivalent of 12 is C.
If the given decimal number is more than 15, then first, divide the decimal number by 16, considering the number as an integer. Keep aside the remainder. 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.

### In the conversion of decimal to hex, what is the change in their bases?

In the conversion of decimal to hex, base 10 numbers will get converted to base 16 numbers.

### What is the hex equivalent to the decimal number 14?

The hex equivalent to the decimal number 14 is E.

### What is the decimal 192 in hex?

In hex, the decimal number 192 is equivalent to C0.
192/16 = 12 {remainder 0}
Taking the quotient and dividing it by 16.
12/16, here quotient will be 0 and remainder 12
The hex equivalent of 12 is C.
Therefore, base 10 of 192 is base 16 of C0.

### What does 0 mean in hex?

The decimal number 0 is also equal to 0 in hex.

Quiz on Decimal to Hex