In binary number system we can only use 0 and 1 to write any number. But for hexadecimal number system we can use total 16 digits to write a number where we use the digits 0 to 9 and character A to F.
In this article we will learn to convert a number from binary to hexadecimal. We can convert a number using two rules where the first rule is for integer and second rule is for fraction part of that number.
Table of Contents
Convert from binary to Hexadecimal
Rules for integer part
Example : Convert 101111001112 to equivalent hexadecimal number
As like as our generally used decimal number, here also we can take necessary zeros at the right side of decimal point and left side before decimal point to convert from binary to hexadecimal. This rule works as our generally used decimal number that we can write 71 instead of 071 and 223 instead of 0223.
Rules for fraction number
Example : Conversion of 0.110011010012 to equivalent hexadecimal number.
We can take necessary zeros at right as well as ignore unnecessary zeros from right, when we convert the fraction part of binary to hexadecimal. We can write 0.111 instead of 0.1110 and 101 instead of 0101
See the bellow example where we have converted a full binary number to its equivalent hexadecimal number. This may help you to understand the topics.
Example : Conversion of 10100110.101012 to equivalent hexadecimal number
To convert this number from binary to hexadecimal we can convert whole number by a single rule which will apply at both it’s integer part and fraction part. We should ignore zeros at left side of integer and right side of fraction part and take necessary zeros at left side of the integer and right side of the fraction part.
So, total hexadecimal equivalent of this binary number will be (A6.A9)16. You can convert any binary number to its equivalent hexadecimal number by this rule.
Please tell us in the comment section if you have any doubt still now.