# Converting Decimal fraction to Hexadecimal

Converting decimal fractions to hexadecimal involves transforming a base-10 fraction into a base-16 fraction. Hexadecimal numbers (base-16) use digits from 0-9 and letters A-F, where A represents 10, B represents 11, C represents 12, D represents 13, E represents 14, and F represents 15. This article will explain how to convert decimal fractions to hexadecimal with detailed steps and examples.

## Steps to Convert Decimal Fractions to Hexadecimal

To convert a decimal fraction to hexadecimal, we use the method of repeated multiplication by 16. Here’s the step-by-step process:

1. Multiply the decimal fraction by 16.
2. Record the integer part of the result. If the integer part is greater than 9, use the corresponding hexadecimal digit (A-F).
3. Update the decimal fraction to the fractional part obtained from the multiplication.
4. Repeat steps 1-3 until the fractional part is 0 or you reach the desired level of precision.
5. The hexadecimal fraction is the sequence of integer parts read in order.

### Example 1: Converting 0.625 to Hexadecimal

1. Multiply 0.625 by 16:
• Result: 10.0
• Integer part: 10 (A in hexadecimal)
• Fractional part: 0

Since the fractional part is 0, we stop here. The hexadecimal fraction is the sequence of integer parts, which gives us 0.A.

So, $0.625_{10} = 0.A_{16}$.

### Example 2: Converting 0.1 to Hexadecimal

1. Multiply 0.1 by 16:

• Result: 1.6
• Integer part: 1
• Fractional part: 0.6
2. Multiply 0.6 by 16:

• Result: 9.6
• Integer part: 9
• Fractional part: 0.6
3. Multiply 0.6 by 16 again:

• Result: 9.6
• Integer part: 9
• Fractional part: 0.6

The fractional part repeats, giving us a repeating sequence in the hexadecimal fraction. The hexadecimal fraction is the sequence of integer parts, which gives us approximately 0.199999…

So, $0.1_{10} \approx 0.1999\ldots_{16}$.

### Example 3: Converting 0.375 to Hexadecimal

1. Multiply 0.375 by 16:
• Result: 6.0
• Integer part: 6
• Fractional part: 0

Since the fractional part is 0, we stop here. The hexadecimal fraction is the sequence of integer parts, which gives us 0.6.

So, $0.375_{10} = 0.6_{16}$.

### General Formula

For a decimal fraction $0.d_1d_2d_3…$, the hexadecimal equivalent can be found by multiplying the fraction by 16, extracting the integer part, and repeating the process for the fractional part:

$0.d_1d_2d_3…_{10} = 0.h_1h_2h_3…_{16}$

where $h_1, h_2, h_3, …$ are the hexadecimal digits obtained in each step.

### Example 4: Converting 0.72 to Hexadecimal (Approximate)

1. Multiply 0.72 by 16:

• Result: 11.52
• Integer part: 11 (B in hexadecimal)
• Fractional part: 0.52
2. Multiply 0.52 by 16:

• Result: 8.32
• Integer part: 8
• Fractional part: 0.32
3. Multiply 0.32 by 16:

• Result: 5.12
• Integer part: 5
• Fractional part: 0.12
4. Multiply 0.12 by 16:

• Result: 1.92
• Integer part: 1
• Fractional part: 0.92

Continuing this process yields a longer repeating sequence. For practical purposes, we might stop here. The hexadecimal fraction is approximately 0.B851.

So, $0.72_{10} \approx 0.B851_{16}$.

## Conclusion

Converting decimal fractions to hexadecimal involves repeated multiplication by 16 and recording the integer parts of the results. This method is useful in various fields, including computer science and digital electronics. By understanding and practicing this process, you can accurately convert any decimal fraction to its hexadecimal equivalent.

Categories IT