Hexadecimal to Binary
Hexadecimal to binary conversion is done to obtain the equivalent binary number of the hexadecimal. The number system is of four types namely, binary number system, octal number system, decimal number system, and hexadecimal number system. Each of these number systems has its own base number that helps in the process of conversion. Hexadecimal to binary is done on their respective base numbers. Let us learn more about how to convert hexadecimal numbers to binary numbers.
1. | What is Hexadecimal to Binary Conversion? |
2. | Steps to Convert Hexadecimal to Binary |
3. | Convert Hexadecimal to Binary With Decimal Point |
4. | FAQs on Hexadecimal to Binary |
What is Hexadecimal to Binary Conversion?
Hexadecimal to binary conversion is the process of converting a hexadecimal number with a base of 16 to a binary number with a base of 2. Converting hexadecimal numbers to binary numbers is important as computers only understand the binary language. Hence, all the other types of number systems are also converted to binary numbers. Converting hexadecimal to binary cannot be done directly. The hexadecimal number has to be converted to a decimal number then converted to a binary number. Before we get to the steps of converting, let us look at what are hexadecimal and binary numbers.
Hexadecimal Number System
The hexadecimal number system has its base number as 16 and uses 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. This system is used in computers to reduce the large-sized strings of the binary system. The largest single digit is F (1 less than the base 16). Each digit in the hexadecimal number system represents the power of the base (16). For example: \(7B4_{16}, 9F_{16}, 3B1A_{16}\) are some examples of numbers in the hexadecimal number system.
Binary Number System
The binary number system uses only two digits: 0 and 1 with the base number as 2. Digits 0 and 1 are called bits and 8 bits together make a byte. The data in computers is stored in terms of bits and bytes. The binary number system does not deal with other numbers such as 2,3,4,5 and so on. For example: \(10001_2, 111101_2, 1010101_2 \) are some examples of numbers in the binary number system.
Steps to Convert Hexadecimal to Binary
To convert hexadecimal to a binary number we need to first convert the hexadecimal number to a decimal number to finally convert it to a binary number. One of the most important aspects to remember here is every hexadecimal number will produce 4 binary digits. The hexadecimal to binary conversion can occur in two methods - First, after the hexadecimal is converted to a decimal number, we convert the decimal number by using the division process to obtain the binary number. Second, we can directly use the hexadecimal to decimal to binary conversion table. Let us look at the steps of both methods.
Method 1: Convert Hexadecimal to Decimal to Binary (without conversion table)
This method requires both multiplication and division of numbers using the respective base numbers. The hexadecimal base number is 16, the base number of a decimal number is 10, and the base of a binary number is 2. Let us look at the steps:
- Step 1: Write the hexadecimal number and find its equivalent decimal number.
- Step 2: To find the decimal equivalent, we multiply each digit with 16n-1, where the digit is in its nth position.
- Step 3: After multiplying the numbers, add the product of those numbers to obtain the decimal number.
- Step 4: To convert decimal to binary, we divide the decimal number by 2 by keeping the remainder aside and dividing the quotient by 2 until we arrive at zero.
- Step 5: Once the quotient is zero, we arrange the remainder from bottom to top i.e. reverse order to obtain the binary number.
Let us look at an example for a better understanding. Convert hexadecimal \((100)_{16}\) to binary.
Step 1 + 2: Convert \((100)_{16}\) to decimal by multiplying each digit with 16n-1. Multiply it
\((100)_{16}\) = 1 × 16(3-1) + 0 × 16(2-1) + 0 × 16(1-1)
\((100)_{16}\) = 1 × 162 + 0 × 161 + 0 × 160
Step 3: Multiply the numbers and add the product to obtain the decimal number.
\((100)_{16}\) = 1 × 256 + 0 × 16 + 0 × 1
\((100)_{16}\) = 256 + 0 + 0
\((100)_{16}\) = 256
Therefore, \((100)_{16}\) = \((256)_{10}\)
Step 4: Convert the decimal number \((256)_{10}\) to a binary number by dividing the number by 2 until the quotient is zero.
Therefore, \((256)_{10}\) = \((100000000)_{2}\)
Step 5: Once the binary is obtained, the conversion is done.
Hence, \((100)_{16}\) = \((100000000)_{2}\).
Method 2: Convert Hexadecimal to Decimal to Binary (with conversion table)
This method is a direct procedure by just looking at the conversation table we can convert hexadecimal to binary. The steps are fairly simple, lets look at them:
- Step 1: Write the hexadecimal
- Step 2: Find the equivalent decimal of each of the digits by looking at the conversion table.
- Step 2: Once the decimal number is obtained, looking at the same table we can convert it to a binary.
- Step 3: Combine all the binary numbers together to obtain the final binary number.
Let us look at an example for a better understanding. Convert hexadecimal \((E5B)_{16}\) to binary.
Step 1: We have the hexadecimal as \((E5B)_{16}\).
Step 2: Looking at the conversion table, find the equivalent of each digit.
E = \((14)_{10}\) , 5 = \((5)_{10}\) , B = \((11)_{10}\)
Step 3: Once the decimal of each digit is obtained, looking at the conversion table convert each decimal number to binary.
\((14)_{10}\) = \((1110)_{2}\)
\((5)_{10}\) = \((0101)_{2}\)
\((11)_{10}\) = \((1011)_{2}\)
Step 4: Combine all the binary numbers together to obtain the final one.
Therefore, \((E5B)_{16}\) = \((111001011011)_{2}\).
Convert Hexadecimal to Binary With Decimal Point
To convert the hexadecimal digit to binary, we use a similar method as used in the previous section. We use the conversion table to convert hexadecimal to binary. While converting with the decimal point, we use the same steps but do not take into consideration the zero placed on the rightmost side since they are called trailing zeros. Let us look at an example, convert \((0.C48)_{16}\) to binary.
Step 1: We have the hexadecimal as \((0.C48)_{16}\).
Step 2: Looking at the conversion table, find the equivalent of each digit. We do not take the zero into consideration.
C = \((12)_{10}\) , 4 = \((4)_{10}\) , 8 = \((8)_{10}\)
Step 3: Once the decimal of each digit is obtained, looking at the conversion table convert each decimal number to binary.
\((12)_{10}\) = \((1100)_{2}\)
\((4)_{10}\) = \((0100)_{2}\)
\((8)_{10}\) = \((1000)_{2}\)
Step 4: Combine all the binary numbers together to obtain the final one. The zero before the decimal will be written along with the final binary number.
Therefore, \((0.C48)_{16}\) = \((110001001000)_{2}\).
Related Topics
Here are a few interesting topics related to the conversion of hexadecimal to binary, take a look.
Examples on Hexadecimal to Binary
-
Example 1: Convert hexadecimal \(DE8_16\) to binary using the conversion table.
Solution: Given, \(DE8_16\)
The decimal equivalent of the hexadecimal digits by using the conversion table are:
D = \(13_10\) , E = \(14_10\) , 8 = \(8_10\)
The binary equivalent of these decimal numbers by using the conversion table are:
\(13_10\) = \(1101_2\)
\(14_10\) = \(1110_2\)
\(8_10\) = \(1000_2\)
Combining the binary numbers together,
Therefore, \(DE8_16\) = \(110111101000_2\).
-
Example 2: Convert hexadecimal \(0.A12_16\) to binary.
Solution: Given, \(0.A12_16\)
The decimal equivalent of the hexadecimal digits,by using the conversion table and keeping the decimal point aside, are:
A = \(10_10\) , 1 = \(1_10\) , 2 = \(2_10\)
The binary equivalent of these decimal numbers by using the conversion table are:
\(10_10\) = \(1010_2\)
\(1_10\) = \(0001_2\)
\(2_10\) = \(0010_2\)
Combining the binary numbers together along with the decimal point,
Therefore, \(0.A12_16\) = \(101000010010_2\).
-
Example 3: Convert hexadecimal \(35_16\) to binary without using the conversion table.
Solution: Given, \(35_16\)
Let us convert \(35_16\) to decimal,
\(35_16\) = 3 × 16(2-1) + 5 × 16(1-1)
\(35_16\) = 3 × 161 + 5 × 160
\(35_16\) = 3 × 16 + 5 × 1
\(35_16\) = 48 + 5
\(35_16\) = 53
\(35_16\) = \(53_10\).
Let us convert this decimal number to binary by dividing the number by 2.
Division by 2 Quotient Remainder 53/2 26 1 26/2 13 0 13/2 6 1 6/2 3 0 3/2 1 1 1/2 0 1 Therefore, \(53_10\) = \(110101_2\).
Hence, \(35_16\) = \(110101_2\).
FAQs on Hexadecimal to Binary
What is Hexadecimal to Binary Conversion?
Hexadecimal to binary conversion helps in obtaining the binary equivalent of the hexadecimal digit. Binary and hexadecimal number systems have their own base numbers which help in the conversion process. The base number of the hexadecimal is 16 and the base number of binary is 2. To convert hexadecimal to binary, we need to convert the hexadecimal digits to decimal to finally convert to binary.
How to Convert Hexadecimal to Binary?
Hexadecimal to binary conversion happens in two different methods. The first method is by converting the hexadecimal digit to decimal by multiplying each digit with 16n-1 and adding them together. Further, convert the decimal number to binary by dividing the decimal by 2 until the quotient is equal to zero. Once the target is reached, the binary number is obtained by writing the remainder together from bottom to top. The second method is done directly by using a conversion table.
How to Convert Hexadecimal to Binary With Decimal Point?
Converting hexadecimal to binary with a decimal point is done in a simple manner using the conversion table. Here are the steps:
- Write the hexadecimal digits.
- Convert each digit to its equivalent decimal number by using the conversion table.
- Once the decimal number is obtained, find the binary equivalent of each decimal number.
- Once each binary number is obtained, write all of them together to obtain the final binary number.
What is 9C in Binary?
To find the binary of hexadecimal, we need to first convert the hexadecimal to decimal then to binary. So, the hexadecimal 9C when converted to decimal is written as:
9 = 9 and C = 12 by looking at the conversion table.
9 × 161 + 12 × 160 = 144 + 12 = 156.
\(9C_16\) = \(156_10\).
Therefore, the binary value is \(9C_16\) = \(10011100_2\).
What is Hexadecimal FF in Binary?
To convert hexadecimal FF to binary, we first convert it to decimal then to binary. Here are the steps:
FF in decimal is written as F = \(15_10\) and F = \(15_10\).
Converting decimal to binary, \(15_10\) = \((1111)_{2}\) and \(15_10\) = \((1111)_{2}\)
Therefore, \(FF_16\) = \((11111111)_{2}\).
What is the Base Used to Convert Hexadecimal to Binary?
To convert hexadecimal to binary, we first convert the hexadecimal digit to a decimal number by using the base number of 16 which is the base number of hexadecimal. Once the decimal number is obtained, we use the base of the binary number system i.e. 2 to convert the decimal to binary. Hence, hexadecimal to binary is converted.
visual curriculum