Hexadecimal is a 16 based number where decimal is 10 based. We can convert a number from hexadecimal to decimal using some rules.
We have to know two rules to convert a number from hexadecimal to decimal where one is for fraction number and other is for integer number.
In this guide we will discuss about these rules to convert hexadecimal to decimal.
Table of Contents
ToggleHexadecimal to decimal number conversion
Hexadecimal to decimal: rules for integer
- Determine the positional value of every digit of hexadecimal number. Multiply every digit by 16^{0} 16^{1} 16^{2} 16^{3} 16^{4} and so one from right to left.
- Add all these values which will be the equivalent decimal number.
Example : Conversion of 13D1A_{16} to equivalent decimal number.
Solution :
= 1 × 16^{4} + 3 × 16^{3} + 13 × 16^{2} + 1 × 16^{1} + 10 × 16^{0}
= 65536 + 12288 + 3328 + 16 + 10
= 81178
Here are also another rules to convert this number from hexadecimal to decimal. Let’s see this.
After converting, we have got the result in decimal is 81178. You can convert any hexadecimal integer number using this rules.
Hexadecimal to decimal: rules for fraction
- Determine the positional value of every digit of hexadecimal fraction number multiplying every digit by 16^{-1} 16^{-2} 16^{-3} 16^{-4} and so one from left to right.
- Add all these values which will give the equivalent value of fractional hexadecimal number to decimal number.
Example: Convert 0.2A5_{16} to equivalent decimal number.
Solution :
(0.2A5)_{2}
= 2 × 16^{-1} + 10 × 16^{-2} + 5 × 16^{-3}
= 0.125 + 0.0391 + 0.0012
= 0.1653
Note: We have taken 4 number after radix point here.
We have got the decimal equivalent of the given hexadecimal number is 0.1653 and you can convert any hexadecimal fraction number using this method.
Let’s see the following example to convert a number from hexadecimal to decimal.
Here, we will convert the integer and fraction part separately. Hope this example will help you to understand the topics.
Example : Conversion of 1351A.2A5_{16} to equivalent decimal number
Solution :
Lets see the conversion of its integer part first.
= 1 × 16^{4} + 3 × 16^{3} + 5 × 16^{2} + 1 × 16^{1} + 10 × 16^{0}
= 65536 + 12288 + 1280 + 16 + 10
= 79130
Here is also another method to convert an integer hexadecimal to decimal number. See this bellow.
As we know the method for converting the integer number, now we will see the method to convert its fraction part from hexadecimal to decimal number. See the method bellow.
(0.2A5)_{2}
= 2 × 16^{-1} + 10 × 16^{-2} + 5 × 16^{-3}
= 0.125 + 0.0391 + 0.0012
= 0.1653
Note: We have taken everything after 4 digits of radix point. You can take more if needed.
After converting both the integer and fraction part, we have got the total equivalence of this hexadecimal number is (79130.1653)_{10} .
However, you can convert any hexadecimal number to its equivalent decimal number by the same way we have followed here.
If you have any doubt still now, then don’t forget to tell us in the comment section bellow. We will try to update our article according to your needs.
Generally I do not read article on blogs, however I wish to say that
this write-up very pressured me to try and do it!
Your writing style has been surprised me. Thanks, very great article.
Hey there! Someone in my Facebook group shared
this website with us so I came to look it over. I’m definitely enjoying the
information. I’m bookmarking and will be tweeting this to
my followers! Excellent blog and superb design and style.
Appreciate the recommendation. Will try it out.