Home Conversion Number Hex to Binary

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 (With Padding)    = 01101100
Binary (Without Padding) = 1101100

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:

How to Convert Fractional Hex to Binary

To convert the fractional hex value to binary, please consider the following steps:

Hex to Binary Example

Example 1: Convert hex value "6AF" to binary value.

  • Separate the hex digits (nibbles) and convert them to their decimal equivalents.
  • Nibble-1 Nibble-2 Nibble-3
    6 A F
    6 10 15
  • Each hex digit is represented by four bits (one nibble) and analyze the position of every bit.
  • 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
  • Identify which bit positions (8, 4, 2, 1) need to be set to HIGH (1) and which remain LOW (0) to represent the hex values. For example, 6 = (0 + 4 + 2 + 0), so its bits are (0 1 1 0). Similarly, A16 = 1010 = (8 + 0 + 2 + 0) = (1 0 1 0) and so on.
  • Nibble-1 Nibble-2 Nibble-3
    Bits: 0 1 1 0 1 0 1 0 1 1 1 1
  • Combine the bits of all nibbles to get the final binary representation.
  • (6AF)16 = (011010101111)2
  • Example 2: Convert hex value "7BFE" to binary.

  • Convert hex nibbles to decimal equivalents.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4
    7 B F E
    7 11 15 14
  • Each hex digit is represented by four bits (one nibble) along with its position.
  • 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
  • Identify which bit positions shold be set to HIGH (1) and which should be set to LOW (0). For example, 7 = (4 + 2 + 1), so its bits are (0 1 1 1). Similarly, B16 = 1110 = (8 + 2 + 1) = (1 0 1 1), F16 = 1510 = (8 + 4 + 2 + 1) = (1 1 1 1), and E16 = 1410 = (8 + 4 + 2) = (1 1 1 0).
  • 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
  • Binary value is:
  • (7BFE)16 = (0111101111111110)2
  • Example 3: Convert hex value "A73B.9C" to binary.

  • Convert hex nibbles to decimal equivalents.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4 Nibble-5 Nibble-6
    A 7 3 B 9 C
    10 7 3 11 9 12
  • Each hex digit is represented by four bits (one nibble) along with its position.
  • 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
  • Identify which bit positions should be set to HIGH (1) and which should be set to LOW (0).
  • 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
  • Binary value is:
  • (A73B.9C)16 = (1010011100111011.10011100)2 or (1010011100111011.100111)2
  • Example 4: Convert hex value "D7A3.2F" to binary.

  • Convert hex nibbles to decimal equivalents.
  • Nibble-1 Nibble-2 Nibble-3 Nibble-4 Nibble-5 Nibble-6
    D 7 A 3 2 F
    13 7 10 3 2 15
  • Each hex digit is represented by four bits (one nibble) along with its position.
  • 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
  • Identify which bit positions should be set to HIGH (1) and which should be set to LOW (0).
  • 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
  • Binary value is:
  • (D7A3.2F)16 = (1101011110100011.00101111)2
  • 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:

    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

    HexadecimalBinary
    100000001
    200000010
    300000011
    400000100
    500000101
    600000110
    700000111
    800001000
    900001001
    A00001010
    B00001011
    C00001100
    D00001101
    E00001110
    F00001111
    1000010000
    1100010001
    1200010010
    1300010011
    1400010100
    1500010101
    1600010110
    1700010111
    1800011000
    1900011001
    1A00011010
    1B00011011
    1C00011100
    1D00011101
    1E00011110
    1F00011111
    2000100000
    2100100001
    2200100010
    2300100011
    2400100100
    2500100101
    2600100110
    2700100111
    2800101000
    2900101001
    2A00101010
    2B00101011
    2C00101100
    2D00101101
    2E00101110
    2F00101111
    3000110000
    3100110001
    3200110010
    3300110011
    3400110100
    3500110101
    3600110110
    3700110111
    3800111000
    3900111001
    3A00111010
    3B00111011
    3C00111100
    3D00111101
    3E00111110
    3F00111111
    4001000000
    HexadecimalBinary
    4101000001
    4201000010
    4301000011
    4401000100
    4501000101
    4601000110
    4701000111
    4801001000
    4901001001
    4A01001010
    4B01001011
    4C01001100
    4D01001101
    4E01001110
    4F01001111
    5001010000
    5101010001
    5201010010
    5301010011
    5401010100
    5501010101
    5601010110
    5701010111
    5801011000
    5901011001
    5A01011010
    5B01011011
    5C01011100
    5D01011101
    5E01011110
    5F01011111
    6001100000
    6101100001
    6201100010
    6301100011
    6401100100
    6501100101
    6601100110
    6701100111
    6801101000
    6901101001
    6A01101010
    6B01101011
    6C01101100
    6D01101101
    6E01101110
    6F01101111
    7001110000
    7101110001
    7201110010
    7301110011
    7401110100
    7501110101
    7601110110
    7701110111
    7801111000
    7901111001
    7A01111010
    7B01111011
    7C01111100
    7D01111101
    7E01111110
    7F01111111
    8010000000
    HexadecimalBinary
    8110000001
    8210000010
    8310000011
    8410000100
    8510000101
    8610000110
    8710000111
    8810001000
    8910001001
    8A10001010
    8B10001011
    8C10001100
    8D10001101
    8E10001110
    8F10001111
    9010010000
    9110010001
    9210010010
    9310010011
    9410010100
    9510010101
    9610010110
    9710010111
    9810011000
    9910011001
    9A10011010
    9B10011011
    9C10011100
    9D10011101
    9E10011110
    9F10011111
    A010100000
    A110100001
    A210100010
    A310100011
    A410100100
    A510100101
    A610100110
    A710100111
    A810101000
    A910101001
    AA10101010
    AB10101011
    AC10101100
    AD10101101
    AE10101110
    AF10101111
    B010110000
    B110110001
    B210110010
    B310110011
    B410110100
    B510110101
    B610110110
    B710110111
    B810111000
    B910111001
    BA10111010
    BB10111011
    BC10111100
    BD10111101
    BE10111110
    BF10111111
    C011000000
    HexadecimalBinary
    C111000001
    C211000010
    C311000011
    C411000100
    C511000101
    C611000110
    C711000111
    C811001000
    C911001001
    CA11001010
    CB11001011
    CC11001100
    CD11001101
    CE11001110
    CF11001111
    D011010000
    D111010001
    D211010010
    D311010011
    D411010100
    D511010101
    D611010110
    D711010111
    D811011000
    D911011001
    DA11011010
    DB11011011
    DC11011100
    DD11011101
    DE11011110
    DF11011111
    E011100000
    E111100001
    E211100010
    E311100011
    E411100100
    E511100101
    E611100110
    E711100111
    E811101000
    E911101001
    EA11101010
    EB11101011
    EC11101100
    ED11101101
    EE11101110
    EF11101111
    F011110000
    F111110001
    F211110010
    F311110011
    F411110100
    F511110101
    F611110110
    F711110111
    F811111000
    F911111001
    FA11111010
    FB11111011
    FC11111100
    FD11111101
    FE11111110
    FF11111111

    by Wasim Khan and it was last modified on

    Related Conversions

    Please find the related numeric conversions.

    You may also like: