Decimal to Hexadecimal Conversion Examples
Decimal-to-hexadecimal conversion is an essential concept in computer science and digital electronics. It helps represent numbers in base-16, which is widely used in programming, memory addressing, and digital systems. The hexadecimal system uses digits from 0 to 9 and letters from A to F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
Methods and examples of decimal-to-hexadecimal conversion are given below.
Repeated Division by 16 Method
This method converts decimal numbers into hexadecimal by repeatedly dividing the number by 16 and recording the remainders.
Algorithm for Repeated Division by 16 Method
Step 1: Start with the given decimal number N
Step 2: Divide N by 16
Step 3: Record the remainder (0 to 15)
Step 4: Convert remainders greater than 9 into A–F
Step 5: Update the quotient
Step 6: Repeat until N = 0
Step 7: Write remainders in reverse order
Step 8: Final result is the hexadecimal number
The following diagram explains the entire algorithm of decimal to hexadecimal conversion

Decimal to Hexadecimal Conversion Examples
Example 1: Convert Decimal (16)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (16)₁₀ into its equivalent hexadecimal

Description
16 is divided by 16, and the quotient is 1 with a remainder of 0.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write the remainder from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (16)₁₀ is (10)₁₆.
Example 2: Convert Decimal (18)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (18)₁₀ into its equivalent hexadecimal

Description
18 is divided by 16, and the quotient is 1 with a remainder of 2.
2 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write the remainder from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (18)₁₀ is (12)₁₆.
Example 3: Convert Decimal (20)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (20)₁₀ into its equivalent hexadecimal

Description
20 is divided by 16, and the quotient is 1 with a remainder of 4.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (20)₁₀ is (14)₁₆.
Example 4: Convert Decimal (25)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (25)₁₀ into its equivalent hexadecimal

Description
25 is divided by 16, and the quotient is 1 with a remainder of 9.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (25)₁₀ is (19)₁₆.
Example 5: Convert Decimal (32)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (32)₁₀ into its equivalent hexadecimal

Description
32 is divided by 16, and the quotient is 2 with a remainder of 0.
2 is divided by 16, and the quotient is 0 with a remainder of 2.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (32)₁₀ is (20)₁₆.
Example 6: Convert Decimal (45)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (45)₁₀ into its equivalent hexadecimal

Description
45 is divided by 16, and the quotient is 2 with a remainder of 13 (D).
2 is divided by 16, and the quotient is 0 with a remainder of 2.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (45)₁₀ is (2D)₁₆.
Example 7: Convert Decimal (64)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (64)₁₀ into its equivalent hexadecimal

Description
64 is divided by 16, and the quotient is 4 with a remainder of 0.
4 is divided by 16, and the quotient is 0 with a remainder of 4.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (64)₁₀ is (40)₁₆.
Example 8: Convert Decimal (100)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (100)₁₀ into its equivalent hexadecimal

Description
100 is divided by 16, and the quotient is 6 with a remainder of 4.
6 is divided by 16, and the quotient is 0 with a remainder of 6.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (100)₁₀ is (64)₁₆.
Example 9: Convert Decimal (255)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (255)₁₀ into its equivalent hexadecimal

Description
255 is divided by 16, and the quotient is 15 with a remainder of 15 (F).
15 is divided by 16, and the quotient is 0 with a remainder of 15 (F).
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (255)₁₀ is (FF)₁₆.
Example 10: Convert Decimal (512)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (512)₁₀ into its equivalent hexadecimal

Description
512 is divided by 16, and the quotient is 32 with a remainder of 0.
32 is divided by 16, and the quotient is 2 with a remainder of 0.
2 is divided by 16, and the quotient is 0 with a remainder of 2.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (512)₁₀ is (200)₁₆.
Example 11: Convert Decimal (75)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (75)₁₀ into its equivalent hexadecimal

Description
75 is divided by 16, and the quotient is 4 with a remainder of 11 (B).
4 is divided by 16, and the quotient is 0 with a remainder of 4.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (75)₁₀ is (4B)₁₆.
Example 12: Convert Decimal (90)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (90)₁₀ into its equivalent hexadecimal

Description
90 is divided by 16, and the quotient is 5 with a remainder of 10 (A).
5 is divided by 16, and the quotient is 0 with a remainder of 5.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (90)₁₀ is (5A)₁₆.
Example 13: Convert Decimal (125)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (125)₁₀ into its equivalent hexadecimal

Description
125 is divided by 16, and the quotient is 7 with a remainder of 13 (D).
7 is divided by 16, and the quotient is 0 with a remainder of 7.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (125)₁₀ is (7D)₁₆.
Example 14: Convert Decimal (150)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (150)₁₀ into its equivalent hexadecimal

Description
150 is divided by 16, and the quotient is 9 with a remainder of 6.
9 is divided by 16, and the quotient is 0 with a remainder of 9.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (150)₁₀ is (96)₁₆.
Example 15: Convert Decimal (200)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (200)₁₀ into its equivalent hexadecimal

Description
200 is divided by 16, and the quotient is 12 with a remainder of 8.
12 is divided by 16, and the quotient is 0 with a remainder of 12 (C).
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (200)₁₀ is (C8)₁₆.
Example 16: Convert Decimal (288)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (288)₁₀ into its equivalent hexadecimal

Description
288 is divided by 16, and the quotient is 18 with a remainder of 0.
18 is divided by 16, and the quotient is 1 with a remainder of 2.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (288)₁₀ is (120)₁₆.
Example 17: Convert Decimal (300)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (300)₁₀ into its equivalent hexadecimal

Description
300 is divided by 16, and the quotient is 18 with a remainder of 12 (C).
18 is divided by 16, and the quotient is 1 with a remainder of 2.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (300)₁₀ is (12C)₁₆.
Example 18: Convert Decimal (712)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (712)₁₀ into its equivalent hexadecimal

Description
712 is divided by 16, and the quotient is 44 with a remainder of 8.
44 is divided by 16, and the quotient is 2 with a remainder of 12 (C).
2 is divided by 16, and the quotient is 0 with a remainder of 2.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (712)₁₀ is (2C8)₁₆.
Example 19: Convert Decimal (1024)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (1024)₁₀ into its equivalent hexadecimal

Description
1024 is divided by 16, and the quotient is 64 with a remainder of 0.
64 is divided by 16, and the quotient is 4 with a remainder of 0.
4 is divided by 16, and the quotient is 0 with a remainder of 4.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (1024)₁₀ is (400)₁₆.
Example 20: Convert Decimal (1500)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (1500)₁₀ into its equivalent hexadecimal

Description
1500 is divided by 16, and the quotient is 93 with a remainder of 12 (C).
93 is divided by 16, and the quotient is 5 with a remainder of 13 (D).
5 is divided by 16, and the quotient is 0 with a remainder of 5.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (1500)₁₀ is (5DC)₁₆.
Example 21: Convert Decimal (5200)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (5200)₁₀ into its equivalent hexadecimal

Description
5200 is divided by 16, and the quotient is 325 with a remainder of 0.
325 is divided by 16, and the quotient is 20 with a remainder of 5.
20 is divided by 16, and the quotient is 1 with a remainder of 4.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (5200)₁₀ is (1450)₁₆.
Example 22: Convert Decimal (10800)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (10800)₁₀ into its equivalent hexadecimal

Description
10800 is divided by 16, and the quotient is 675 with a remainder of 0.
675 is divided by 16, and the quotient is 42 with a remainder of 3.
42 is divided by 16, and the quotient is 2 with a remainder of 10 (A).
2 is divided by 16, and the quotient is 0 with a remainder of 2.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (10800)₁₀ is (2A30)₁₆.
Example 23: Convert Decimal (17189)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (17189)₁₀ into its equivalent hexadecimal

Description
17189 is divided by 16, and the quotient is 1074 with a remainder of 5.
1074 is divided by 16, and the quotient is 67 with a remainder of 2.
67 is divided by 16, and the quotient is 4 with a remainder of 3.
4 is divided by 16, and the quotient is 0 with a remainder of 4.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (17189)₁₀ is (4325)₁₆.
Example 24: Convert Decimal (24688)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (24688)₁₀ into its equivalent hexadecimal

Description
24688 is divided by 16, and the quotient is 1543 with a remainder of 0.
1543 is divided by 16, and the quotient is 96 with a remainder of 7.
96 is divided by 16, and the quotient is 6 with a remainder of 0.
6 is divided by 16, and the quotient is 0 with a remainder of 6.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (24688)₁₀ is (6070)₁₆.
Example 25: Convert Decimal (35474)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (35474)₁₀ into its equivalent hexadecimal

Description
35474 is divided by 16, and the quotient is 2217 with a remainder of 2.
2217 is divided by 16, and the quotient is 138 with a remainder of 9.
138 is divided by 16, and the quotient is 8 with a remainder of 10 (A).
8 is divided by 16, and the quotient is 0 with a remainder of 8.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (35474)₁₀ is (8A92)₁₆.
Example 26: Convert Decimal (50000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (50000)₁₀ into its equivalent hexadecimal

Description
50000 is divided by 16, and the quotient is 3125 with a remainder of 0.
3125 is divided by 16, and the quotient is 195 with a remainder of 5.
195 is divided by 16, and the quotient is 12 with a remainder of 3.
12 is divided by 16, and the quotient is 0 with a remainder of 12 (C).
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (50000)₁₀ is (C350)₁₆.
Example 27: Convert Decimal (65535)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (65535)₁₀ into its equivalent hexadecimal

Description
65535 is divided by 16, and the quotient is 4095 with a remainder of 15 (F).
4095 is divided by 16, and the quotient is 255 with a remainder of 15 (F).
255 is divided by 16, and the quotient is 15 with a remainder of 15 (F).
15 is divided by 16, and the quotient is 0 with a remainder of 15 (F).
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (65535)₁₀ is (FFFF)₁₆.
Example 28: Convert Decimal (70000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (70000)₁₀ into its equivalent hexadecimal

Description
70000 is divided by 16, and the quotient is 4375 with a remainder of 0.
4375 is divided by 16, and the quotient is 273 with a remainder of 7.
273 is divided by 16, and the quotient is 17 with a remainder of 1.
17 is divided by 16, and the quotient is 1 with a remainder of 1.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (70000)₁₀ is (11170)₁₆.
Example 29: Convert Decimal (88888)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (88888)₁₀ into its equivalent hexadecimal

Description
88888 is divided by 16, and the quotient is 5555 with a remainder of 8.
5555 is divided by 16, and the quotient is 347 with a remainder of 3.
347 is divided by 16, and the quotient is 21 with a remainder of 11 (B).
21 is divided by 16, and the quotient is 1 with a remainder of 5.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (88888)₁₀ is (15B38)₁₆.
Example 30: Convert Decimal (99999)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (99999)₁₀ into its equivalent hexadecimal

Description
99999 is divided by 16, and the quotient is 6249 with a remainder of 15 (F).
6249 is divided by 16, and the quotient is 390 with a remainder of 9.
390 is divided by 16, and the quotient is 24 with a remainder of 6.
24 is divided by 16, and the quotient is 1 with a remainder of 8.
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (99999)₁₀ is (1869F)₁₆.
Example 31: Convert Decimal (120000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (120000)₁₀ into its equivalent hexadecimal

Description
120000 is divided by 16, and the quotient is 7500 with a remainder of 0.
7500 is divided by 16, and the quotient is 468 with a remainder of 12 (C).
468 is divided by 16, and the quotient is 29 with a remainder of 4.
29 is divided by 16, and the quotient is 1 with a remainder of 13 (D).
1 is divided by 16, and the quotient is 0 with a remainder of 1.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (120000)₁₀ is (1D4C0)₁₆.
Example 32: Convert Decimal (150000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (150000)₁₀ into its equivalent hexadecimal

Description
150000 is divided by 16, and the quotient is 9375 with a remainder of 0.
9375 is divided by 16, and the quotient is 585 with a remainder of 15 (F).
585 is divided by 16, and the quotient is 36 with a remainder of 9.
36 is divided by 16, and the quotient is 2 with a remainder of 4.
2 is divided by 16, and the quotient is 0 with a remainder of 2.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (150000)₁₀ is (249F0)₁₆.
Example 33: Convert Decimal (200000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (200000)₁₀ into its equivalent hexadecimal

Description
200000 is divided by 16, and the quotient is 12500 with a remainder of 0.
12500 is divided by 16, and the quotient is 781 with a remainder of 4.
781 is divided by 16, and the quotient is 48 with a remainder of 13 (D).
48 is divided by 16, and the quotient is 3 with a remainder of 0.
3 is divided by 16, and the quotient is 0 with a remainder of 3.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (200000)₁₀ is (30D40)₁₆.
Example 34: Convert Decimal (250000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (250000)₁₀ into its equivalent hexadecimal

Description
250000 is divided by 16, and the quotient is 15625 with a remainder of 0.
15625 is divided by 16, and the quotient is 976 with a remainder of 9.
976 is divided by 16, and the quotient is 61 with a remainder of 0.
61 is divided by 16, and the quotient is 3 with a remainder of 13 (D).
3 is divided by 16, and the quotient is 0 with a remainder of 3.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (250000)₁₀ is (3D090)₁₆.
Example 35: Convert Decimal (300000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (300000)₁₀ into its equivalent hexadecimal

Description
300000 is divided by 16, and the quotient is 18750 with a remainder of 0.
18750 is divided by 16, and the quotient is 1171 with a remainder of 14 (E).
1171 is divided by 16, and the quotient is 73 with a remainder of 3.
73 is divided by 16, and the quotient is 4 with a remainder of 9.
4 is divided by 16, and the quotient is 0 with a remainder of 4.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (300000)₁₀ is (493E0)₁₆.
Example 36: Convert Decimal (350000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (350000)₁₀ into its equivalent hexadecimal

Description
350000 is divided by 16, and the quotient is 21875 with a remainder of 0.
21875 is divided by 16, and the quotient is 1367 with a remainder of 3.
1367 is divided by 16, and the quotient is 85 with a remainder of 7.
85 is divided by 16, and the quotient is 5 with a remainder of 5.
5 is divided by 16, and the quotient is 0 with a remainder of 5.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (350000)₁₀ is (55730)₁₆.
Example 37: Convert Decimal (400000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (400000)₁₀ into its equivalent hexadecimal

Description
400000 is divided by 16, and the quotient is 25000 with a remainder of 0.
25000 is divided by 16, and the quotient is 1562 with a remainder of 8.
1562 is divided by 16, and the quotient is 97 with a remainder of 10 (A).
97 is divided by 16, and the quotient is 6 with a remainder of 1.
6 is divided by 16, and the quotient is 0 with a remainder of 6.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (400000)₁₀ is (61A80)₁₆.
Example 38: Convert Decimal (450000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (450000)₁₀ into its equivalent hexadecimal

Description
450000 is divided by 16, and the quotient is 28125 with a remainder of 0.
28125 is divided by 16, and the quotient is 1757 with a remainder of 13 (D).
1757 is divided by 16, and the quotient is 109 with a remainder of 13 (D).
109 is divided by 16, and the quotient is 6 with a remainder of 13 (D).
6 is divided by 16, and the quotient is 0 with a remainder of 6.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (450000)₁₀ is (6DDD0)₁₆.
Example 39: Convert Decimal (500000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (500000)₁₀ into its equivalent hexadecimal

Description
500000 is divided by 16, and the quotient is 31250 with a remainder of 0.
31250 is divided by 16, and the quotient is 1953 with a remainder of 2.
1953 is divided by 16, and the quotient is 122 with a remainder of 1.
122 is divided by 16, and the quotient is 7 with a remainder of 10 (A).
7 is divided by 16, and the quotient is 0 with a remainder of 7.
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (500000)₁₀ is (7A120)₁₆.
Example 40: Convert Decimal (750000)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (750000)₁₀ into its equivalent hexadecimal

Description
750000 is divided by 16, and the quotient is 46875 with a remainder of 0.
46875 is divided by 16, and the quotient is 2929 with a remainder of 11 (B).
2929 is divided by 16, and the quotient is 183 with a remainder of 1.
183 is divided by 16, and the quotient is 11 with a remainder of 7.
11 is divided by 16, and the quotient is 0 with a remainder of 11 (B).
Now, we write all remainders from bottom to top to get the final hexadecimal number. The hexadecimal representation of the decimal number (750000)₁₀ is (B71B0)₁₆.
Decimal Fraction to Hexadecimal Conversion
Decimal fractions (numbers with decimal points) can also be converted into hexadecimal form using a multiplication-based method. This is important in computer science when working with base-16 representations of real numbers.
Algorithm for Multiplication by 16 Method (Fractional Part)
This method converts decimal fractions into hexadecimal by repeatedly multiplying by 16 and extracting integer parts.
Step 1: Take the decimal fractional number (for example, 0.x)
Step 2: Multiply the fractional number by 16
Step 3: Note the integer part of the result (0 to 15)
Step 4: Convert values greater than 9 into hexadecimal form (A–F)
Step 5: Keep only the fractional part of the result
Step 6: Repeat Steps 2 to 5 with the new fractional part
Step 7: Continue until the fraction becomes 0 or required precision (3–4 digits) is achieved
Step 8: Write all recorded integer parts in the same order
Decimal Fraction to Hexadecimal Conversion Examples
Example 01: Convert (0.625)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (0.625)₁₀ into its equivalent hexadecimal

Description
0.625 is multiplied by 16 and the result is 10.0, so the integer part is 10 (A)
Hexadecimal fraction = 0.A₁₆
Example 02: Convert (0.375)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (0.375)₁₀ into its equivalent hexadecimal

Description
0.375 is multiplied by 16 and the result is 6.0, so the integer part is 6
Hexadecimal fraction = 0.6₁₆
Example 03: Convert (0.8125)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (0.8125)₁₀ into its equivalent hexadecimal

Description
0.8125 is multiplied by 16 and the result is 13.0, so the integer part is 13 (D)
Hexadecimal fraction = 0.D₁₆
Example 04: Convert (0.1)₁₀ to Hexadecimal (Approximate)
Solution
The following diagram shows the conversion of the decimal number (0.1)₁₀ into its equivalent hexadecimal

Description
0.1 is multiplied by 16 and the result is 1.6, so the integer part is 1
0.6 is multiplied by 16 and the result is 9.6, so the integer part is 9
0.6 is multiplied by 16 and the result is 9.6, so the integer part is 9
0.6 is multiplied by 16 and the result is 9.6, so the integer part is 9
(Hexadecimal starts repeating)
Hexadecimal fraction ≈ 0.1999₁₆
Example 05: Convert (0.45)₁₀ to Hexadecimal (Approximate up to 4 digits)
Solution
The following diagram shows the conversion of the decimal number (0.45)₁₀ into its equivalent hexadecimal

Description
0.45 is multiplied by 16 and the result is 7.2, so the integer part is 7
0.2 is multiplied by 16 and the result is 3.2, so the integer part is 3
0.2 is multiplied by 16 and the result is 3.2, so the integer part is 3
0.2 is multiplied by 16 and the result is 3.2, so the integer part is 3
Hexadecimal fraction ≈ 0.7333₁₆
Decimal (Integer + Fraction) to Hexadecimal Conversion
When a decimal number has both integer and fractional parts, convert each separately.
Step 01: Convert integer part using division by 16
Step 02: Convert fractional part using multiplication by 16
Step 03: Combine both results
Example 01: Convert (16.625)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (16.625)₁₀ into its equivalent hexadecimal

Integer Part Description
- 16 is divided by 16 and the quotient is 1 with a remainder of 0
- 1 is divided by 16 and the quotient is 0 with a remainder of 1
Hexadecimal integer part = 10₁₆
Fraction Part Description
- 0.625 is multiplied by 16 and the result is 10.0, so the integer part is 10 (A)
Hexadecimal fraction = 0.A₁₆
Final Answer
(16.625)₁₀ = (10.A)₁₆
Example 02: Convert (25.375)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (25.375)₁₀ into its equivalent hexadecimal

Integer Part Description
- 25 is divided by 16 and the quotient is 1 with a remainder of 9
- 1 is divided by 16 and the quotient is 0 with a remainder of 1
Hexadecimal integer part = 19₁₆
Fraction Part Description
- 0.375 is multiplied by 16 and the result is 6.0, so the integer part is 6
Hexadecimal fraction = 0.6₁₆
Final Answer
(25.375)₁₀ = (19.6)₁₆
Example 03: Convert (56.8125)₁₀ to Hexadecimal
Solution
The following diagram shows the conversion of the decimal number (56.8125)₁₀ into its equivalent hexadecimal

Integer Part Description
- 56 is divided by 16 and the quotient is 3 with a remainder of 8
- 3 is divided by 16 and the quotient is 0 with a remainder of 3
Hexadecimal integer part = 38₁₆
Fraction Part Description
- 0.8125 is multiplied by 16 and the result is 13.0, so the integer part is 13 (D)
Hexadecimal fraction = 0.D₁₆
Final Answer
(56.8125)₁₀ = (38.D)₁₆
Example 04: Convert (100.1)₁₀ to Hexadecimal (Approximate)
Solution
The following diagram shows the conversion of the decimal number (100.1)₁₀ into its equivalent hexadecimal

Integer Part Description
- 100 is divided by 16 and the quotient is 6 with a remainder of 4
- 6 is divided by 16 and the quotient is 0 with a remainder of 6
Hexadecimal integer part = 64₁₆
Fraction Part Description
- 0.1 is multiplied by 16 and the result is 1.6, so the integer part is 1
- 0.6 is multiplied by 16 and the result is 9.6, so the integer part is 9
- 0.6 is multiplied by 16 and the result is 9.6, so the integer part is 9
- 0.6 is multiplied by 16 and the result is 9.6, so the integer part is 9
Hexadecimal fraction ≈ 0.1999₁₆
Final Answer
(100.1)₁₀ ≈ (64.1999)₁₆
Example 05: Convert (255.45)₁₀ to Hexadecimal (Approximate up to 4 digits)
Solution
The following diagram shows the conversion of the decimal number (255.45)₁₀ into its equivalent hexadecimal

Integer Part Description
- 255 is divided by 16 and the quotient is 15 with a remainder of 15 (F)
- 15 is divided by 16 and the quotient is 0 with a remainder of 15 (F)
Hexadecimal integer part = FF₁₆
Fraction Part Description
- 0.45 is multiplied by 16 and the result is 7.2, so the integer part is 7
- 0.2 is multiplied by 16 and the result is 3.2, so the integer part is 3
- 0.2 is multiplied by 16 and the result is 3.2, so the integer part is 3
- 0.2 is multiplied by 16 and the result is 3.2, so the integer part is 3
Hexadecimal fraction ≈ 0.7333₁₆
Final Answer
(255.45)₁₀ ≈ (FF.7333)₁₆
Decimal to Hexadecimal Conversion Examples for Quick Practice
Practicing different decimal values improves speed and accuracy in conversions. A list of decimal to octal examples is given below.
| Decimal | Hex | Decimal | Hex | Decimal | Hex | Decimal | Hex |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 25 | 19 | 50 | 32 | 75 | 4B |
| 1 | 1 | 26 | 1A | 51 | 33 | 76 | 4C |
| 2 | 2 | 27 | 1B | 52 | 34 | 77 | 4D |
| 3 | 3 | 28 | 1C | 53 | 35 | 78 | 4E |
| 4 | 4 | 29 | 1D | 54 | 36 | 79 | 4F |
| 5 | 5 | 30 | 1E | 55 | 37 | 80 | 50 |
| 6 | 6 | 31 | 1F | 56 | 38 | 81 | 51 |
| 7 | 7 | 32 | 20 | 57 | 39 | 82 | 52 |
| 8 | 8 | 33 | 21 | 58 | 3A | 83 | 53 |
| 9 | 9 | 34 | 22 | 59 | 3B | 84 | 54 |
| 10 | A | 35 | 23 | 60 | 3C | 85 | 55 |
| 11 | B | 36 | 24 | 61 | 3D | 86 | 56 |
| 12 | C | 37 | 25 | 62 | 3E | 87 | 57 |
| 13 | D | 38 | 26 | 63 | 3F | 88 | 58 |
| 14 | E | 39 | 27 | 64 | 40 | 89 | 59 |
| 15 | F | 40 | 28 | 65 | 41 | 90 | 5A |
| 16 | 10 | 41 | 29 | 66 | 42 | 91 | 5B |
| 17 | 11 | 42 | 2A | 67 | 43 | 92 | 5C |
| 18 | 12 | 43 | 2B | 68 | 44 | 93 | 5D |
| 19 | 13 | 44 | 2C | 69 | 45 | 94 | 5E |
| 20 | 14 | 45 | 2D | 70 | 46 | 95 | 5F |
| 21 | 15 | 46 | 2E | 71 | 47 | 96 | 60 |
| 22 | 16 | 47 | 2F | 72 | 48 | 97 | 61 |
| 23 | 17 | 48 | 30 | 73 | 49 | 98 | 62 |
| 24 | 18 | 49 | 31 | 74 | 4A | 99 | 63 |
Common Mistakes in Decimal to Hexadecimal Conversion
Avoiding common mistakes in decimal to hexadecimal conversion is essential for achieving accurate results in exams and practical applications. Since hexadecimal uses base 16 and includes both numbers and alphabets, errors are quite common if concepts are not clear.
1. Writing Remainders in Wrong Order
Explanation:
In the division-by-16 method, remainders must be written from bottom to top. Writing them in the same order produces an incorrect hexadecimal number.
Example:
Correct: 25 → 19
Incorrect: 25 → 91
Tip:
Always reverse the order of remainders before writing the final answer.
2. Forgetting Hexadecimal Digits (A–F)
Explanation:
Hexadecimal includes digits beyond 9, represented by letters A to F. Students often forget to convert values 10–15 into these symbols.
Example:
Correct: 26 → 1A
Incorrect: 26 → 110
Tip:
Memorize:
A = 10, B = 11, C = 12, D = 13, E = 14, F = 15
3. Skipping Steps in Division
Explanation:
Each division step contributes one hexadecimal digit. Skipping steps results in incomplete or incorrect values.
Example:
Missing a step while converting 100 can give the wrong result.
Tip:
Write every division step clearly, especially in exams.
4. Confusing Base Values
Explanation:
Hexadecimal uses base 16, but students sometimes mistakenly apply base 2 or base 10 logic.
Example:
Using powers of 2 instead of 16 leads to incorrect answers.
Tip:
Remember: Hexadecimal = base 16 → use powers of 16 (1, 16, 256, 4096, …).
5. Incorrect Handling of Fractions
Explanation:
Fractional parts must be converted using multiplication by 16, not division.
Example:
0.625 should be multiplied by 16 repeatedly, not divided.
Tip:
Convert integer and fractional parts separately, then combine.
6. Mixing Uppercase and Lowercase Improperly
Explanation:
Hex digits can be written in uppercase (A–F) or lowercase (a–f), but inconsistency can create confusion in exams or coding.
Example:
Correct: 3A or 3a
Avoid mixing like: 3aF
Tip:
Stick to one format (preferably uppercase) for clarity.
Applications of Decimal to Hexadecimal Conversion
1. Computer Programming
Hexadecimal is widely used in programming due to its compact representation of binary data.
Explanation:
Each hex digit represents 4 binary bits, making it easier to read and write large binary numbers.
Use Cases:
- Memory addresses
- Machine-level programming
- Debugging
2. Web Development
Hexadecimal is commonly used in web design for defining colors.
Explanation:
Colors are represented as hex codes (e.g., #FF5733).
Use Cases:
- CSS color codes
- UI/UX design
3. Digital Electronics
Hexadecimal simplifies working with binary-based systems.
Explanation:
It provides a shorter representation of long binary values.
Use Cases:
- Microprocessors
- Embedded systems
- Digital circuit design
4. Data Storage and Memory
Hexadecimal is used to represent memory locations and stored data.
Explanation:
Large binary values are easier to interpret in hex format.
Use Cases:
- RAM addressing
- File systems
- Low-level data handling
5. Networking and Cybersecurity
Hexadecimal plays a key role in networking and security systems.
Explanation:
Data packets, MAC addresses, and encryption keys are often represented in hex.
Use Cases:
- MAC addresses
- Encryption algorithms
- Network debugging
Conclusion
Decimal to hexadecimal conversion is a crucial concept in computer science that simplifies binary representation and is widely used in programming, web development, and digital systems. By understanding the correct methods, avoiding common mistakes, and practicing regularly, students can confidently solve problems and apply these concepts in real-world scenarios.