Convering a Decimal Fractional Number to Hexadecimal

213 Views Asked by At

Let's say I have a decimal number like 5.8463 I know how to convert the integer part to Hex, by either putting it into binary first then grouping it into 4 bits, then to hex. Or using a divide method. However, I don't understand how to get the decimal into hex.

I was told that I have to multiply the Decimal by 16 several times. But the thing is, my course does not permit the use of calculators, so how does one

do 0.8463 * 16 In ones head?

I Guess my mental math is lacking, or its simply the inexperience in doing these kinds of multiplication problems. Any help on that, and further how to attempt the question would be much appreciated.

1

There are 1 best solutions below

4
On BEST ANSWER

You can do the binary expansion easily, no multiplying by 16 required. One way to do it: repeatedly double the number you're expanding, write down the integer part and subtract it away, and repeat. For $0.8463$ this gives:

$$\begin{array}[ccc]\relax 0.8463&1.6926&1\\ 0.6926&1.3852&1\\ 0.3852&0.7704&0\\ 0.7704&1.5408&1\\ 0.5408&1.0816&1\\ 0.0816&0.1632&0\\ 0.1632&0.3264&0\\ 0.3264&0.6528&0\\ \cdots\\ \end{array} $$ So the binary expansion of $0.8463$ is $0.\underbrace{1101}_d\underbrace{1000}_8\ldots$, or $0.d8\ldots$ in hex.