Base 16 to base 10 number conversion

14.4k Views Asked by At

I know that if we want to convert from base 16 to base 10 we do as follows (for example):

Given : $15C$ in base $16$

Conversion to base 10: $12 \times 16^0 + 5 \times 16^1 + 1 \times 16^2 = 348$ in base $10$

But I am unable to convert $15C.38$(base $16$) to base $10$.


Can someone show how ?

3

There are 3 best solutions below

0
On BEST ANSWER

After the point, it goes like $16^{-1}$, $16^{-2}$ etc.

Therefore, $(15C.38)_{16}$ can be converted by doing the following:

$1 \times 16^2 + 5 \times 16^1 + 12 \times 16^0 + 3 \times 16^{-1} + 8 \times 16^{-2}$.

Another method is, writing every digit as 4-bit binary string and than converting those to decimal. i.e.

$(0001$ $0101$ $1100$ . $0011$ $1000)_{2} = (?)_{10}$

2
On

After the "radix" point (the dot), we can just divide each integer in place $i$ counting from the left by $16^{i}$. So $0.36_{16} = 3/16+6/16^2$. This generalizes to all bases.

2
On

We have $15C_{16}=348_{10}$.

The fractional part is $0.38_{16}$ which is $(3\times 16^{-1})+(8\times 16^{-2})=0.21875$.

So $15C.38_{16}=348.21875_{10}$.