I was wondering if a decimal fraction could be converted into a hexadecimal
fraction? I have seen it many times ? but I have been also told that decimal or
binary fraction has no meaning in hex. If there is , I would appreciate if someone
shows me the best way of converting a decimal fraction into a hexadecimal fraction.
Thanks.
If you have a decimal fraction, simply convert the numerator and denominator to hex, and you've won:
$$\left(\frac{42}{128}\right)_{10} = \left(\frac{2\text{A}}{80}\right)_{16}$$
Converting from hex to binary is even easier, because each hex digit maps to a four-digit binary number:
$$\left(\frac{2\text{A}}{80}\right)_{16} = \left(\frac{\text{0010 1010}}{\text{1000 0000}}\right)_{2}$$