Binary to Hexadecimal
Binary to hexadecimal conversion is another type of conversion that occurs in the number system. There are 4 types of the number system in mathematics i.e. binary, octal, decimal, and hexadecimal. Each of these forms can be converted to the other type of number system by using the conversion table or the conversion method. Let us explore the different ways of converting binary numbers to hexadecimal numbers and solve a few examples for a better understanding.
1. | What is Binary to Hexadecimal Conversion? |
2. | Steps to Convert Binary to Hexadecimal |
3. | Convert Binary to Hexadecimal With Decimal Point |
4. | FAQs on Binary to Hexadecimal |
What is Binary to Hexadecimal Conversion?
Binary to hexadecimal conversion is the process of converting binary numbers to hexadecimal numbers. Binary numbers have a base number of 2 while the base number of hexadecimal is 16. The conversion from binary to hexadecimal occurs with the help of the base numbers. There are ways through which the conversion is done, the first is by converting the binary to a decimal number then a hexadecimal number. The second is by using the binary to the hexadecimal conversion table. Before we get to the method of converting, let us see what binary and hexadecimal are.
Binary Number System
Binary number system is one of the simplest number systems that use the digits 0 and 1 only along with the base number as 2. Binary numbers are mostly used in computers that are very handy for engineers, networking and communication specialist, and in many modern computers. Digits 0 and 1 are called bits and 8 bits together make a byte. The binary number system does not deal with other numbers such as 2,3,4,5 and so on. For example: \(10110001_2, 11001101_2, 1011001_2 \) are some examples of numbers in the binary number system.
Hexadecimal Number System
Hexadecimal number system is the positional numeral system in the number system that uses the base number of 16 along with sixteen digits/alphabets: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, F. Here, A-F of the hexadecimal system means the numbers 10-15 of the decimal number system respectively. Each digit in the hexadecimal number system represents the power of the base (16). For example: \(4E7_{16}, 3F_{16}, 6D2C_{16}\) are some examples of numbers in the hexadecimal number system.
Steps to Convert Binary to Hexadecimal
To convert binary to hexadecimal numbers, we need to use both the base numbers i.e 2 for binary and 16 for hexadecimal. The conversion process happens in two methods, the first method is by using the binary to hexadecimal conversion table where 1 hexadecimal number is equivalent to 4 binary numbers. The second method is by converting the hexadecimal number to a decimal number then convert it to a binary. Let us see both the methods in detail.
Method 1: Convert Binary to Hexadecimal With Conversion Table
One of the simplest and easiest methods to convert from binary to hexadecimal is by using the conversion table. Since binary numbers only have 0 and 1 that are called bits and hexadecimal numbers are also positional number system, every 4 bits or numbers is equivalent to 1 hexadecimal number that includes the alphabets A - F as well. The conversion table is as follows:
Let us look at an example for a better understanding.
For example: Convert \((00110110101)_{2}\) to Hexadecimal.
We first group the numbers in a set of 4. Since every 4 digit in binary becomes one 1 digit in hexadecimal. Add zeros to the left of the last digit if there aren't enough digits to make a set of four:
0001 1011 0101
By looking at the conversion table, we can find the equivalent hexadecimal number.
0001 = 1 , 1011 = B , 0101 = 5
We arrange the numbers together to get the final number.
Therefore, \((00110110101)_{2}\) = \((1B5)_{16}\).
Method 2: Convert Binary to Hexadecimal Without Conversion Table
Binary numbers can be converted to hexadecimal numbers without using the conversion table as well. Binary numbers are first converted to decimal number then to a hexadecimal number. Here, the base number of a decimal number is 10. The binary number can be converted to a decimal number by expressing each digit as a product of the given number 1 or 0 to the respective power of 2. And to convert from decimal to hexadecimal we divide the number 16 until the quotient is zero. Let us look at an example for a better understanding.
For example: Convert \((0111000101001)_{2}\) to Hexadecimal.
We first convert the binary number to a decimal number. To do that each digit is multiplied with the corresponding power of two.
\((0111000101001)_{2}\) = 0 × 212 + 1 × 211 + 1 × 210 + 1 × 29 + 0 × 28 + 0 × 27 + 0 × 26 + 1 × 25 + 0 × 24 + 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20
\((0111000101001)_{2}\) = 0 × 4096 + 1 × 2048 + 1 × 1024 + 1 × 512 + 0 × 256 + 0 × 128 + 0 × 64 + 1 × 32 + 0 × 16 + 1× 8 + 0 × 4 + 0 × 2 + 1 × 1
\((0111000101001)_{2}\) = 0 + 2048 + 1024 + 512 + 0 + 0 + 0 + 32 + 0 + 8 + 0 + 0 + 1
\((0111000101001)_{2}\) = 3625
Therefore, \((0111000101001)_{2}\) = \((3625)_{10}\).
Once the decimal number is obtained, we convert this decimal number to a hexadecimal number. The number is divided by 16 until the quotient is zero.
3625/16 = 226 is the quotient, the remainder is 9
226/16 = 14 is the quotient, the remainder is 2
14/16 = 0 is the quotient, remainder is 14
The final number is obtained by arranging the numbers from bottom to top i.e. 1429. Since the hexadecimal number system only deals with 0 - 9 in numbers and 10 -15 in alphabets as A - F, so the number is E29.
Therefore, \((0111000101001)_{2}\) = \((E29)_{16}\).
Convert Binary to Hexadecimal With Decimal Point
To convert the binary to hexadecimal with a decimal point, we use a similar method as used in the previous section. We use the conversion table to convert binary to hexadecimal numbers. With a decimal point, the binary number will have the fractional part as well which is considered after the decimal point. While conversion the decimal point does not affect the position of the numbers. Let us look at an example to understand this better.
For example: \((0100110.10110110)_{2}\)
We first group the numbers in a set of 4. Since every 4 digit in binary becomes one 1 digit in hexadecimal. Add zeros to the left of the last digit if there aren't enough digits to make a set of four:
0010 0110 . 1011 0110
By looking at the conversion table mentioned in the previous section, we can find the equivalent hexadecimal number.
0010 = 2 , 0110 = 6 , 1011 = B , 0110 = 6
We arrange the numbers together to get the final number. The decimal point will be at the same position as it is in the binary number.
Therefore, \((0100110.10110110)_{2}\) = \((26.B6)_{16}\).
Related Topics
Listed below are a few interesting topics related to binary to hexadecimal, take a look.
Examples on Binary to Hexadecimal
-
Example 1: Find the hexadecimal equivalent of \((001101011)_{2}\).
Solution:
We first group the numbers in a set of 4. Since every 4 digit in binary becomes one 1 digit in hexadecimal. Add zeros to the left of the last digit if there aren't enough digits to make a set of four:
0000 0110 1011
By looking at the conversion table, we can find the equivalent hexadecimal number.
0000 = 0 0110 = 6 1011 = B
We arrange the numbers together to get the final number.
Therefore, \((001101011)_{2}\) = \((6B)_{16}\).
-
Example 2: Find the decimal equivalent of \((111001001110)_{2}\).
Solution:
Multiply each digit of the binary number by the corresponding power of two:
\((111001001110)_{2}\) = 1 × 211 + 1 × 210 + 1 × 29 + 0 × 28 + 0 × 27 + 1 × 26 + 0 × 25 + 0 × 24 + 1 × 23 + 1 × 22 + 1 × 21 + 0 × 20
\((111001001110)_{2}\) = 1 × 2048 + 1 × 1024 + 1 × 512 + 0 × 256 + 0 × 128 + 1 × 64 + 0 × 32 + 0 × 16 + 1 × 8 + 1 × 4 + 1 × 2 + 0 × 1
\((111001001110)_{2}\) = 2048 + 1024 + 512 + 0 + 0 + 64 + 0 + 0 + 8 + 4 + 2 + 0
\((111001001110)_{2}\) = 3662
Therefore, \((111001001110)_{2}\) = \((3662)_{10}\).
-
Example 3: Find the hexadecimal equivalent of \((11001.001110)_{2}\)
Solution:
We first group the numbers in a set of 4. Since every 4 digit in binary becomes one 1 digit in hexadecimal. Add zeros to the left and right to the last digits if there aren't enough digits to make a set of four:
0001 1001 . 0011 1000
By looking at the conversion table mentioned in the previous section, we can find the equivalent hexadecimal number.
0001 = 1 , 1001 = 9 , 0011 = 3 , 1000 = 8
We arrange the numbers together to get the final number. The decimal point will be at the same position as it is in the binary number.
Therefore, \((11001.001110)_{2}\) = \((19.38)_{16}\).
FAQs on Binary to Hexadecimal
What is Binary to Hexadecimal?
Binary to hexadecimal is a form of conversion where a binary number with the base of 2 is converted to a hexadecimal number with the base of 16. Binary numbers only have 2 numbers or bits i.e. 0 and 1. While hexadecimal numbers deal with numbers and alphabets, 0 - 9 and A - F (10 -15).
How Do You Convert Binary to Hexadecimal?
The steps to convert binary to hexadecimal are:
- Break down the binary number into groups with 4 digits in each group.
- By looking at the conversion table, write the hexadecimal equivalent of each of the groups.
- Combine all the numbers together to get the hexadecimal number.
What is the Binary Number 11000011 in Hexadecimal?
Break the binary into groups with 4 digits in each group. 1100 0011. By looking the conversion table, 1100 = C and 0011 = 3. Hence, \((11000011)_{2}\) = \((C3)_{16}\).
What is FFFF in Binary?
\((FFFF)_{16}\ = \((1111111111111111)_{2}\).
What is the Hexadecimal Number F Equal to in Binary?
Looking at the binary to hexadecimal conversion table, we can say F = 1111.
How to Convert a Binary Number to a Decimal Number?
We can convert a binary number to a decimal number expressing each digit as a product of the given number 1 or 0 to the respective power of 2. If a binary number has n digits, B = \((a)_{n-1}\).. \((a)_{3}\) \((a)_{2}\) \((a)_{1}\) \((a)_{0}\), the decimal number for it is given as, D = ( \((a)_{0}\)×20) + ( \((a)_{1}\)×21) + ( \((a)_{2}\)×22) + ...
visual curriculum