![]() |
VOOZH | about |
A number system is a way of expressing numbers using a consistent set of symbols or digits. The most common number systems are based on different "bases" or "radices," which determine how numbers are represented.
Here are some common types of number systems:
Here, we will discuss the conversion between binary to hexadecimal and vice versa.
Binary to Hex Table
Hereβs a handy Binary to Hexadecimal Conversion Table you can use for quick reference.
Read More: Number System
Conversion from Binary to Hexadecimal Number System simplifies large numbers, making them more compact and readable for easier use in programming, debugging, and memory management.
There are two methods to accomplish this: one is direct conversion, and the other involves first converting the binary to another base number system, such as decimal or octal, and then converting it to hexadecimal.
Take the given binary number and group the bits into sets of four, known as quads. Then, replace each quad with its hexadecimal equivalent. The resulting number will be the binary number converted into hexadecimal.
Note: The radix point separates the integer and fractional parts of a number in any base system.
Example 1: (1110)2 = (_______)16
First convert (1110)2 into decimal = (1110)2 = 23 Γ 1 + 22 Γ 1 + 21 Γ 1 + 20 Γ 0 = 8 + 4 + 2 + 0 = (14)10
Then, convert (14)10 into hexadecimal = (14)10 = (E)16
Example 2: (0.11001)2 = (_________)16
First convert (0)2 to decimal = 0*20 = (0)10
Then convert (11001)2 to decimal = 1*2-1 + 1*2-2 + 0*2-3 + 0*2-4 + 1*2-5 = (0.78125)10Now, convert (0)10 into hexadecimal = (0)16
Now convert (.78125)10 to hexadecimal0.78125*16 = 12.5
0.5*16 = 8.0
(.78125)10 to hexadecimal = (.C8)16where C for 12 and 8 for 8
So (0.11001)2 = (0.C8)16
| Decimal | Binary | Hexadecimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
11 | 1011 | B |
12 | 1100 | C |
13 | 1101 | D |
14 | 1110 | E |
15 | 1111 | F |
Example: (11101111.111001)2 = (_______)16
1110 1111.1110 01 1110 1111 1110 0100 E F E 4 (11101111.111001)2 = (EF.E4)16
We added two zeros at the last as we have only 01, which does not make a quad. 0s are added after 01 because it is after the radix point.
Having explored the conversion from binary to hexadecimal, let's now look at the reverse process.
Converting hexadecimal to binary involves changing a number from the hexadecimal (base-16) system to its binary (base-2) equivalent. Since computers process and store data in binary (0s and 1s), any data input in other number systems, such as decimal or hexadecimal, must be converted into binary for the computer to handle it.
To convert a hexadecimal number into binary
Example 1: Convert (1AC5)16 to binary.
Example 2: Convert 3F916 to an equivalent binary number.
Solution:
Split the hex number into individual digits.
3 = 0011
F = 1111
9 = 1001
Combine the binary groups.
001111110012
Check Other Conversions:
β€ Binary Number System to Octal Number System
β€ Binary Number System to Decimal Number System
β€ Hexadecimal Number System to Decimal Number System
Question 1: Convert: (111111101)2 = (_________)16.
Solution:
(111111101)2 = (The bold three 0s are added before 1 as it is integral part (before the radix point))
= 1 F D
= (111111101)2 = (1FD)16
Question 2: Convert: (01011110001)2 = (_________)16.
Solution:
(01011110001)2 = (The bold one 0s are added before 1 as it is integral part (before the radix point))
= 2 F 1
= (01011110001)2 = (2F1)16
Question 3: Convert: (0.11001)2 = (_________)16.
Solution:
(0.11001)2 = . (The bold three 0s are added before 0 as it is an integral part (before the radix point), and 3 bold 0s are added after 1 as 1 is after the radix point).
= 0 C 8
(0.11001)2 = (0.C8)16
Question 4: Convert: (1.1)2 = (_______)16.
Solution:
(1.1)2 = . (The bold three 0s are added before 1 as it is an integral part (before the radix point), and 3 bold 0s are added after 1 as 1 is after the radix point).
= 1 8
= (1.1)2 = (1.8)16
Here are some unsolved Practice questions for practice with an answer key at the end.
Question 1: Convert the binary number 1101011101 to hexadecimal.
Question 2: Convert the binary number 101110111011 to hexadecimal.
Question 3: Convert the binary number 100110101101 to hexadecimal.
Question 4: Convert the hexadecimal number 9B to binary.
Question 5: Convert the hexadecimal number C5A to binary.
Answer Key
1101011101β35D101110111011βBBB100110101101β9AD9Bβ10011011C5Aβ110001011010
Converting binary to hexadecimal is a simple process that utilizes grouping and direct conversion through the lookup table. This method is efficient and commonly used in computing and digital electronics due to the compact nature of hexadecimal representation compared to binary.