Hex to Binary Converter
To use hexadecimal to binary converter, type any hex value e.g. "6C" and click on the Convert button and you will get the binary value of "01101100" on right side. You can convert any value upto the range of 7FFFFFFFFFFFFFFF which is 16 hex characters.
Hex to Binary Conversion:
Binary (Without Padding) = 1101100
- Hexadecimal Numeral System
- Binary Numeral System
- How to Convert Hex to Binary
- How to Convert Fractional Hex to Binary
- Hex to Binary Examples
- FAQs (Hex to Binary Conversion)
- Hex to Binary Table
Hexadecimal Numeral System (Hex Numbers)
Hexadecimal numbers, commonly known as hex values, operate on a base-16 numbering system. This system uses sixteen unique symbols: the digits "0" to "9" and the letters "A" through "F" from the English alphabet. These letters represent the decimal values 10 to 15. Each hex character corresponds to exactly four binary bits, also called a nibble. For example, the hexadecimal digit 5 equals "0101" in binary, while the digit 7 equals "0111". Two hexadecimal digits together form one byte, where each individual hex digit represents half a byte (four bits). For instance, the hex value "17" equals 23 in decimal and in binary equal to "0001 0111". Every hex digit represent the power of 16, for example for the hex value "2A.1C", A represents the position 160, 2 represents the position 161 and similarly for the fractional part, 1 is placed at the position 16-1 and C is placed at position 16-2
Example:
Hex value "6B9A.C1" written as power of 16:
Digit | Position | Power of 16 | Value |
---|---|---|---|
6 | 163 (4096's place) | 163 = 4096 | 6 × 4096 = 24576 |
B (11) | 162 (256's place) | 162 = 256 | 11 × 256 = 2816 |
9 | 161 (16's place) | 161 = 16 | 9 × 16 = 144 |
A (10) | 160 (1's place) | 160 = 1 | 10 × 1 = 10 |
C (12) | 16-1 (1/16's place) | 16-1 = 1/16 = 0.0625 | 12 × 0.0625 = 0.75 |
1 | 16-2 (1/256's place) | 16-2 = 1/256 = 0.00390625 | 1 × 0.00390625 = 0.00390625 |
Decimal Result: 24576 + 2816 + 144 + 10 + 0.75 + 0.00390625 = 27546.75390625
(6B9A.C1)16 = (27546.75390625)10
Binary Numeral System
The binary number system is a way of representing numerical values using only two symbols: 0 and 1. It is based on a radix, or base, of 2. In this system, each position of a bit corresponds to a power of 2, such as 20, 21, 22, and so forth. A single binary digit is called a bit, while a sequence of 8 bits forms a complete byte. For representing fractional binary numbers, negative powers of 2 are used, for example: 2-1, 2-2, and so on.
Example:
Let's break down binary value (11001.101)2 as powers of 2:
Digit | Position | Power of 2 | Value |
---|---|---|---|
1 | 24 (Sixteens place) | 24 = 16 | 1 × 16 = 16 |
1 | 23 (Eights place) | 23 = 8 | 1 × 8 = 8 |
0 | 22 (Fours place) | 22 = 4 | 0 × 4 = 0 |
0 | 21 (Twos place) | 21 = 2 | 0 × 2 = 0 |
1 | 20 (Ones place) | 20 = 1 | 1 × 1 = 1 |
1 | 2-1 (Halves place) | 2-1 = 0.5 | 1 × 0.5 = 0.5 |
0 | 2-2 (Quarters place) | 2-2 = 0.25 | 0 × 0.25 = 0 |
1 | 2-3 (Eighths place) | 2-3 = 0.125 | 1 × 0.125 = 0.125 |
Decimal Result: 16 + 8 + 0 + 0 + 1 + 0.5 + 0 + 0.125 = 25.625
(11001.101)2 = (25.625)10
How to Convert Hex to Binary
One hex digit is represented by four bits or nibble and therefore any hex value can be easily converted to binary by considering the following steps:
Step-1: Given the hex number, separate the nibbles or hex digit and convert them to their decimal equivalents.
Step-2: Each hex digits is represented by four bits or nibble, therefore, the rightmost bit represents (20 = 1) position, the next one represents (21 = 2) position, third one on the left side represents (22 = 4) position and the leftmost bit represents (23 = 8) position and so on. Represents the hex digits in the nibble format.
Step-3: Determine which bits positions (8, 4, 2, 1) needed to be high "1" and which bits needed to low "0" to represents the hex value. For example, value 12 = (8 + 4 + 0 + 0), which means (1 1 0 0) is the bits status.
Step-4: Combine together all the bits for all the hex digits to get the final binary value.
How to Convert Fractional Hex to Binary
To convert the fractional hex value to binary, please consider the following steps:
Step-1: Get the fractional part from the hex number.
Step-2: Convert each hex digit to corresponding 4 bits or nibble.
Step-3: Combine the bits to get the final binary value.
Hex to Binary Example
Example 1: Convert hex value "6AF" to binary value.
Nibble-1 | Nibble-2 | Nibble-3 | ||||
---|---|---|---|---|---|---|
6 | A | F | ||||
6 | 10 | 15 |
Nibble-1 | Nibble-2 | Nibble-3 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Position: | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | ||
8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 |
Nibble-1 | Nibble-2 | Nibble-3 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bits: | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 |
Example 2: Convert hex value "7BFE" to binary.
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | ||||
---|---|---|---|---|---|---|---|
7 | B | F | E | ||||
7 | 11 | 15 | 14 |
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Position: | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | |||
8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 |
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bits: | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Example 3: Convert hex value "A73B.9C" to binary.
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | Nibble-5 | Nibble-6 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | 7 | 3 | B | 9 | C | ||||||
10 | 7 | 3 | 11 | 9 | 12 |
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | Nibble-5 | Nibble-6 | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Position: | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 2-1 | 2-2 | 2-3 | 2-4 | 2-1 | 2-2 | 2-3 | 2-4 | |||||||||||||
8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 1/2 | 1/4 | 1/8 | 1/16 | 1/2 | 1/4 | 1/8 | 1/16 |
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | Nibble-5 | Nibble-6 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bits: | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 |
Example 4: Convert hex value "D7A3.2F" to binary.
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | Nibble-5 | Nibble-6 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
D | 7 | A | 3 | 2 | F | ||||||
13 | 7 | 10 | 3 | 2 | 15 |
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | Nibble-5 | Nibble-6 | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Position: | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 23 | 22 | 21 | 20 | 2-1 | 2-2 | 2-3 | 2-4 | 2-1 | 2-2 | 2-3 | 2-4 | |||||||||||||
8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 8 | 4 | 2 | 1 | 1/2 | 1/4 | 1/8 | 1/16 | 1/2 | 1/4 | 1/8 | 1/16 |
Nibble-1 | Nibble-2 | Nibble-3 | Nibble-4 | Nibble-5 | Nibble-6 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bits: | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
Frequently Ask Questions: Hex to Binary Conversion
Q1: Perform the bitwise OR of two hex numbers A5 and 3F and provide the result in binary?
Convert both hex numbers to binary (A5)16 = (10100101)2 and (3F)16 = (00111111)2
Perform the bitwise OR operation:
A = 10100101
B = 00111111
---------------------------------
A | B (Bitwise OR) = 10111111
Final Binary value = (10111111)2
Q2: Perform the bitwise XOR of two hex numbers F2 and 9C and provide the result in binary?
Let's convert both to binary (F2)16 = (11110010)2 and (9C)16 = (10011100)2
Perform the bitwise XOR operation:
A = 11110010
B = 10011100
-------------------------------------
A ⊕ B (Bitwise XOR) = 01101110
Binary value = (01101110)2
Q3: A memory address hex value is 0x7C2B. What is its binary representation?
"0x" notation is used to represent hexadecimal numbers, and the given number has 4 hex digits: 7, C, 2 and B
Find the binary value of each hex digit:
(7)16 = (0111)2
(C)16 = (1100)2
(2)16 = (0010)2
(B)16 = (1011)2
Binary value = (0111110000101011)2
Q4: Convert signed hex 0x8A (8-bit) to binary?
Since 8 = 1000, A = 1010, Therefore, (8A)16 = (10001010)2
As it is a signed number and MSB = 1, it is anegative number. Take 2's complement:
Invert Bits: 01110101
Add 1: 01110101 + 1 = 01110110 = (-118) in decimal.
Binary value = (01110110)2
Q5: Right shift the hex value 0xD6 (8-bit) and provide the result in binary?
As D = 1101, 6 = 0110, Therefore, (D6)16 = (11010110)2
Shift 3 binary bits to the right and do zero padding on the left side: 00011010
Binary value = (00011010)2
Q6: Convert hex 0x9A.C3 to binary?
Since 9 = 1001, A = 1010, C = 1100 and 3 = 0011
Binary result = (10011010.11000011)2
Hex to Binary Conversion Table
Hexadecimal | Binary |
---|---|
1 | 00000001 |
2 | 00000010 |
3 | 00000011 |
4 | 00000100 |
5 | 00000101 |
6 | 00000110 |
7 | 00000111 |
8 | 00001000 |
9 | 00001001 |
A | 00001010 |
B | 00001011 |
C | 00001100 |
D | 00001101 |
E | 00001110 |
F | 00001111 |
10 | 00010000 |
11 | 00010001 |
12 | 00010010 |
13 | 00010011 |
14 | 00010100 |
15 | 00010101 |
16 | 00010110 |
17 | 00010111 |
18 | 00011000 |
19 | 00011001 |
1A | 00011010 |
1B | 00011011 |
1C | 00011100 |
1D | 00011101 |
1E | 00011110 |
1F | 00011111 |
20 | 00100000 |
21 | 00100001 |
22 | 00100010 |
23 | 00100011 |
24 | 00100100 |
25 | 00100101 |
26 | 00100110 |
27 | 00100111 |
28 | 00101000 |
29 | 00101001 |
2A | 00101010 |
2B | 00101011 |
2C | 00101100 |
2D | 00101101 |
2E | 00101110 |
2F | 00101111 |
30 | 00110000 |
31 | 00110001 |
32 | 00110010 |
33 | 00110011 |
34 | 00110100 |
35 | 00110101 |
36 | 00110110 |
37 | 00110111 |
38 | 00111000 |
39 | 00111001 |
3A | 00111010 |
3B | 00111011 |
3C | 00111100 |
3D | 00111101 |
3E | 00111110 |
3F | 00111111 |
40 | 01000000 |
Hexadecimal | Binary |
---|---|
41 | 01000001 |
42 | 01000010 |
43 | 01000011 |
44 | 01000100 |
45 | 01000101 |
46 | 01000110 |
47 | 01000111 |
48 | 01001000 |
49 | 01001001 |
4A | 01001010 |
4B | 01001011 |
4C | 01001100 |
4D | 01001101 |
4E | 01001110 |
4F | 01001111 |
50 | 01010000 |
51 | 01010001 |
52 | 01010010 |
53 | 01010011 |
54 | 01010100 |
55 | 01010101 |
56 | 01010110 |
57 | 01010111 |
58 | 01011000 |
59 | 01011001 |
5A | 01011010 |
5B | 01011011 |
5C | 01011100 |
5D | 01011101 |
5E | 01011110 |
5F | 01011111 |
60 | 01100000 |
61 | 01100001 |
62 | 01100010 |
63 | 01100011 |
64 | 01100100 |
65 | 01100101 |
66 | 01100110 |
67 | 01100111 |
68 | 01101000 |
69 | 01101001 |
6A | 01101010 |
6B | 01101011 |
6C | 01101100 |
6D | 01101101 |
6E | 01101110 |
6F | 01101111 |
70 | 01110000 |
71 | 01110001 |
72 | 01110010 |
73 | 01110011 |
74 | 01110100 |
75 | 01110101 |
76 | 01110110 |
77 | 01110111 |
78 | 01111000 |
79 | 01111001 |
7A | 01111010 |
7B | 01111011 |
7C | 01111100 |
7D | 01111101 |
7E | 01111110 |
7F | 01111111 |
80 | 10000000 |
Hexadecimal | Binary |
---|---|
81 | 10000001 |
82 | 10000010 |
83 | 10000011 |
84 | 10000100 |
85 | 10000101 |
86 | 10000110 |
87 | 10000111 |
88 | 10001000 |
89 | 10001001 |
8A | 10001010 |
8B | 10001011 |
8C | 10001100 |
8D | 10001101 |
8E | 10001110 |
8F | 10001111 |
90 | 10010000 |
91 | 10010001 |
92 | 10010010 |
93 | 10010011 |
94 | 10010100 |
95 | 10010101 |
96 | 10010110 |
97 | 10010111 |
98 | 10011000 |
99 | 10011001 |
9A | 10011010 |
9B | 10011011 |
9C | 10011100 |
9D | 10011101 |
9E | 10011110 |
9F | 10011111 |
A0 | 10100000 |
A1 | 10100001 |
A2 | 10100010 |
A3 | 10100011 |
A4 | 10100100 |
A5 | 10100101 |
A6 | 10100110 |
A7 | 10100111 |
A8 | 10101000 |
A9 | 10101001 |
AA | 10101010 |
AB | 10101011 |
AC | 10101100 |
AD | 10101101 |
AE | 10101110 |
AF | 10101111 |
B0 | 10110000 |
B1 | 10110001 |
B2 | 10110010 |
B3 | 10110011 |
B4 | 10110100 |
B5 | 10110101 |
B6 | 10110110 |
B7 | 10110111 |
B8 | 10111000 |
B9 | 10111001 |
BA | 10111010 |
BB | 10111011 |
BC | 10111100 |
BD | 10111101 |
BE | 10111110 |
BF | 10111111 |
C0 | 11000000 |
Hexadecimal | Binary |
---|---|
C1 | 11000001 |
C2 | 11000010 |
C3 | 11000011 |
C4 | 11000100 |
C5 | 11000101 |
C6 | 11000110 |
C7 | 11000111 |
C8 | 11001000 |
C9 | 11001001 |
CA | 11001010 |
CB | 11001011 |
CC | 11001100 |
CD | 11001101 |
CE | 11001110 |
CF | 11001111 |
D0 | 11010000 |
D1 | 11010001 |
D2 | 11010010 |
D3 | 11010011 |
D4 | 11010100 |
D5 | 11010101 |
D6 | 11010110 |
D7 | 11010111 |
D8 | 11011000 |
D9 | 11011001 |
DA | 11011010 |
DB | 11011011 |
DC | 11011100 |
DD | 11011101 |
DE | 11011110 |
DF | 11011111 |
E0 | 11100000 |
E1 | 11100001 |
E2 | 11100010 |
E3 | 11100011 |
E4 | 11100100 |
E5 | 11100101 |
E6 | 11100110 |
E7 | 11100111 |
E8 | 11101000 |
E9 | 11101001 |
EA | 11101010 |
EB | 11101011 |
EC | 11101100 |
ED | 11101101 |
EE | 11101110 |
EF | 11101111 |
F0 | 11110000 |
F1 | 11110001 |
F2 | 11110010 |
F3 | 11110011 |
F4 | 11110100 |
F5 | 11110101 |
F6 | 11110110 |
F7 | 11110111 |
F8 | 11111000 |
F9 | 11111001 |
FA | 11111010 |
FB | 11111011 |
FC | 11111100 |
FD | 11111101 |
FE | 11111110 |
FF | 11111111 |
Related Conversions
Please find the related numeric conversions.
- ASCII Text to Binary
- ASCII Text to Decimal
- ASCII Text to Hex
- Binary to ASCII Text
- Binary to Decimal
- Binary to Hex
- Binary to Octal
- Decimal to ASCII Text
- Decimal to Binary
- Decimal to Hex
- Decimal to Octal
- Hex to ASCII Text
- Hex to Decimal
- Hex to Octal
- Octal to Binary
- Octal to Decimal
- Octal to Hex