Decimal to Hexadecimal
Decimal to hexadecimal is a system of conversion that is often used in computers and digital systems. The decimal number system has a base of 10. It has only 10 notations, i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Whereas the hexadecimal system operates with a base of 16 because there are a total of 16 notations in it: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, F. To denote the double digits 10, 11, 12, 13, 14, 15 in the hexadecimal number system, we use characters A, B, C, D, E, F respectively. Let us learn more about the conversion methods of decimal to hexadecimal and the steps of conversion associated with it.
1. | What is Decimal to Hexadecimal Conversion? |
2. | How to Convert Decimal to Hexadecimal? |
3. | Convert Decimal to Hexadecimal With Decimal Point |
4. | FAQs on Decimal to Hexadecimal |
What is Decimal to Hexadecimal Conversion?
Decimal to hexadecimal conversion is the process of converting a decimal number with a base of 10 to a hexadecimal number with a base of 16. While converting a number from the decimal number system to the hexadecimal number system, we need to carefully observe the base of the number. The number needs to be divided by 16 until the quotient is zero. Observe the following table which shows the representation of decimal numbers and hexadecimal numbers.
How to Convert Decimal to Hexadecimal?
In order to convert decimal to hexadecimal, we need to do some basic mathematical calculations using the following steps.
- Step 1: Divide the given decimal number system value by 16 and note the remainder.
- Step 2: Divide the quotient by 16. Repeat this until you get a quotient equal to zero.
- Step 3: Use the characters A, B, C, D, E, F in place of 10, 11, 12, 13, 14, 15 in the remainders respectively, wherever needed.
- Step 4: Follow the reverse order pattern to arrange all the values of the remainder.
- Step 5: The obtained number is the required hexadecimal number.
The Decimal to hexadecimal conversion formula of given numbers can be expressed as,
P10 = Q16
where P is a decimal number and Q is a hexadecimal number.
Let us understand how to convert a decimal number to a hexadecimal number with the help of the following example.
Example: Convert 5386 to a hexadecimal number.
Solution: We will use the following steps to convert 5386 to hexadecimal.
- Step 1: Divide 5386 by 16 to get 336 as the quotient and note the remainder 10.
- Step 2: Divide the quotient 336 obtained from the previous step by 16 to get 21 as the next quotient and note the remainder 0.
- Step 3: Divide the quotient 21 by 16 to get 1 as the new quotient and note the remainder 5.
- Step 4: Divide the quotient 1 by 16 to get 0 as the new quotient and note the remainder 1. Since we get 0 as the quotient, we stop here.
- Step 5: Now, reverse the remainders and note the combined number that it forms. We need to keep in mind that 10 is written as A in the hexadecimal number system.
- Step 6: After writing the remainders in the reverse order we get, 150A. Therefore, 5386 is expressed as 150A in the hexadecimal number system. This can be written as \((5386)_{10}\) is equal to \((150A)_{16}\).
Convert Decimal to Hexadecimal With Decimal Point
In order to convert any fractional number to a hexadecimal number, we convert the integer part in the usual way as shown above and we multiply the fractional part (decimal part) by 16. Since the base of a hexadecimal number is 16 we multiply the fractional part by 16 until it becomes 0. We need to note down the integer part of these products after every step. The obtained result is the hexadecimal number of the given fractional number. Let us understand this with the help of an example.
Example: Convert the fractional decimal number 18.765625 into a hexadecimal number.
Solution: We will solve the integer part and fractional part individually.
- Step 1: First let us work on the integer part. After we divide 18 by 16, we get the quotient as, 18 ÷ 16 = 1 and the remainder as 2.
- Step 2: Now, when we divide 1 by 16, we get the quotient as, 16 ÷ 1 = 0, and the remainder as 1.
- Step 3: Now, let us note the combined form of the remainders by reversing them, which makes it 12. This will be written as the integer part of the hexadecimal value.
- Step 4: After this step, we will work on the fractional part which is 0.765625
- Step 5: We need to multiply 0.765625 by 16 which will give 0.765625 × 16 = 12.25 in which we will note the integer part 12. This 12 is expressed as C in the hexadecimal number system.
- Step 6: Now, we will multiply the fractional part of this product by 16 again. After multiplying the fractional part 0.25 by 16 we get, 0.25 × 16 = 4
- Step 7: Now, after we combine the integer part and the fractional part of the hexadecimal form we get, 12.C4. Therefore 18.765625 is equal to 12.C4 in the hexadecimal number system. This means \((18.765625)_{10}\) is equal to \((12.C4)_{16}\).
☛Related Topics
Decimal to Hexadecimal Conversion Examples
-
Example 1: Convert the 740 decimal to hexadecimal number.
Solution:
Division Fact Result Remainder in Hexadecimal 740 ÷ 16 46 4 46 ÷ 16 2 14 = E (14 is represented by E in hexadecimal) 2 ÷ 16 0 2 Now, write the remainders from bottom to top (in the reverse order).
\((740)_{10}\) = \((2E4)_{16}\)
The equivalent hexadecimal number of decimal integer 740 is 2E4.
-
Example 2: Convert the 592 decimal to hexadecimal.
Solution:
To convert 592 decimal to hexadecimal let us follow the given steps.
592÷16
Remainder = 0, Quotient = 3737÷16
Remainder = 5, Quotient = 22÷16
Remainder = 2, Quotient = 0\((592)_{10}\) = \((250)_{16}\)
-
Example 3: Using the decimal to hexadecimal conversion formula, convert the decimal number 451 to a hexadecimal number.
Solution:
Let us find the hexadecimal number which is equivalent to the decimal number 451.
Using decimal to hexadecimal conversion formula,
\((451)_{10}\) = \((Y)_{16}\)
451÷16 gives Quotient = 28, Remainder = 3
28÷16 gives Quotient = 1, Remainder = 12 = C
1 ÷ 16 gives Quotient = 0 , Remainder = 1
Answer: The decimal number \((451)_{10}\) is equivalent to the hexadecimal number \((1C3)_{16}\)
FAQs on Decimal to Hexadecimal
What is Decimal to Hexadecimal Conversion?
Decimal to hexadecimal conversion is the process of converting a decimal number with a base of 10 to a hexadecimal number with a base of 16.
What is the Base Value in Decimal and Hexadecimal?
The base value of a decimal number is represented by 10 and in hexadecimal, the base value is represented by 16. For example, \((592)_{10}\) = \((250)_{16}\).
How to Convert Decimal to Hexadecimal?
In order to convert a decimal number to hexadecimal, we divide the decimal number by 16 because 16 is a base value of hexadecimal numbers. We keep on dividing until the quotient becomes zero. The remainders are noted down and written in the reverse order in the combined form. It should be noted that the values of 10, 11, 12, 13, 14, 15 are expressed as A, B, C, D, E, and F in the hexadecimal form.
How to Convert 63 Decimal to Hexadecimal?
To convert 63 decimal to hexadecimal we will use the division method. After dividing the decimal number 63 by 16, we get the remainder as 15 and the quotient as 3. Here, we will write the remainder 15 as F. In the next step, we will divide 3/16 where the quotient is 0 and the remainder is 3. On combining the digits in reverse order the hexadecimal value of 63 is 3F. Therefore, \((63)_{10}\) is equal to \((3F)_{16}\).
What is the Value of 50 in the Hexadecimal Number System?
To convert 50 from decimal to hexadecimal we will divide 50 by 16 till we get the quotient as 0. On dividing the decimal number 50 by 16 we get the remainder as 2 and quotient as 3. In the next step, we will divide 3/16 where the obtained quotient is 0 and the remainder is 3. On combining the digits in reverse order we get the hexadecimal value of 50 as 32. Therefore, \((50)_{10}\) is equal to \((32)_{16}\).
Convert 315 from Decimal to Hexadecimal.
To convert 315 from decimal to hexadecimal we will start dividing 315 by 16 until we get the quotient as 0. After dividing the decimal number 315 by 16 we get the remainder as 11 and the quotient as 19. In the next step, we will divide 19/16 where the obtained quotient is 1 and the remainder is 3. Now, after dividing 1 by 16 we get 0 as the quotient and 1 as the remainder. On combining the digits in reverse order the hexadecimal value of 315 comes to 13B. It should be noted that as we write the combined remainders in the reverse order, we write the hexadecimal value for 11 which is B. Therefore, \((315)_{10}\) is equal to \((13B)_{16}\).
visual curriculum