Home Conversion Number Binary to Hex

Binary to Hex Converter

To use binary to hex converter, type a binary value e.g. "11101000" and click on the Convert button and you will get the hexadecimal value of "E8" on the right side. The binary to hexadecimal conversion is explained in detail below and hexadecimal values are based on radix "16" while binary values are based on radix "2".

Binary to Hex Conversion:

Hexadecimal = E8

Binary Numeral System

The binary number system represents numbers using only two digits: 0 and 1, and it operates on a base, or radix, of 2. Binary values are expressed as powers of 2, such as 20, 21, 22, and so on. Each single binary digit is known as a bit, and a group of 8 bits together makes up a byte. For fractional values digits are represented with the negative powers e.g. 2-1, 2-2 ..

Example:

Binary value (10110.011)2 can be written as powers to the base 2:

Digit Position Power of 2 Value
1 24 (Sixteens place) 24 = 16 1 × 16 = 16
0 23 (Eights place) 23 = 8 0 × 8 = 0
1 22 (Fours place) 22 = 4 1 × 4 = 4
1 21 (Twos place) 21 = 2 1 × 2 = 2
0 20 (Ones place) 20 = 1 0 × 1 = 0
0 2-1 (Halves place) 2-1 = 0.5 0 × 0.5 = 0
1 2-2 (Quarters place) 2-2 = 0.25 1 × 0.25 = 0.25
1 2-3 (Eighths place) 2-3 = 0.125 1 × 0.125 = 0.125

(10110.011)2 = (1 × 24) + (0 × 23) + (1 × 22) + (1 × 21) + (0 × 20) + (0 × 2-1) + (1 × 2-2) + (1 × 2-2) = (16 + 4 + 2 + 0.25 + 0.125) = (22.375)10 (Decimal)

Hexadecimal Numeral System (Hex Numbers)

Hexadecimal numbers, commonly referred to as hex numbers, are part of the base-16 numeral system, which uses 16 unique symbols to represent values. These symbols include the decimal digits 0 through 9 and the letters A to F, where A, B, C, D, E, and F represent the decimal values 10 through 15, respectively.

The hexadecimal system is widely used in computer science, digital electronics, programming, and other scientific applications because it provides a more compact and readable way to represent large binary numbers. In hex numbers, each digit represents a power of 16:

For fractional hexadecimal numbers, the values after the hexadecimal point are calculated using negative powers of 16. The first digit after the point represents 16-1, the second represents 16-2, and so forth.

Example:

Hex value "7BD4A" can be written as,

Digit Position Power of 16 Value
7 164 (65536's place) 164 = 65536 7 × 65536 = 458752
B (11) 163 (4096's place) 163 = 4096 11 × 4096 = 45056
D (13) 162 (256's place) 162 = 256 13 × 256 = 3328
4 161 (16's place) 161 = 16 4 × 16 = 64
A (10) 160 (1's place) 160 = 1 10 × 1 = 10

Decimal Result: 458752 + 45056 + 3328 + 64 + 10 = 507210

(7BD4A)16 = (507210)10

How to Convert Binary to Hex

Four binary bits or digits constitute one hexadecimal digit or number e.g. "0000" in binary equals 0 in hex, "0001" in binary equals 1 in hex, "0111" in binary equals 7 in hex and "1110" in binary equals "E" in hex. All the binary number digits or bits positions represent the powers to the base 2.

How to Convert Binary Fraction to Hex

The fractional binary value can be converted to hex using the following step:

Binary to Hex Examples

Example 1: Convert (10001010)2 to hex value.

  • Represent the binary numbers in nibbles (four-bits).
  • Nibble-1 Nibble-2
    23 22 21 20 23 22 21 20
    Position: 8 4 2 1 8 4 2 1
    Bits: 1 0 0 0 1 0 1 0
  • Multiply positions with bits for all nibbles and add the results to get the hex values.
  • Results: = (8×1) + (4×0) + (2×0) + (1×0) = (8×1) + (4×0) + (2×1) + (1×0)
    = 8 + 0 + 0 + 0 = 8 + 0 + 2 + 0
    = (8)10 = (10)10
    = (8)16 = (A)16
  • Final hex value is:
  • (10001010)2 = (8A)16
  • Example 2: Convert (1101101)2 to hex value.

  • Group the binary bit in nibbles (four-bits) and do te zero padding on the left side if required.
  • Nibble-1 Nibble-2
    23 22 21 20 23 22 21 20
    Position: 8 4 2 1 8 4 2 1
    Bits: 0 1 1 0 1 1 0 1
  • Multiply positions with bits for all nibbles and add the results to get the hex values.
  • Results: = (8×0) + (4×1) + (2×1) + (1×0) = (8×1) + (4×1) + (2×0) + (1×1)
    = 0 + 4 + 2 + 0 = 8 + 4 + 0 + 1
    = (6)10 = (13)10
    = (8)16 = (D)16
  • Final hex value is:
  • (1101101)2 = (6D)16
  • Example 3: Convert (11011)2 to hex value.

  • Group the bits in 4-bits groups and do te zero padding on the left side if necessary.
  • Nibble-1 Nibble-2
    23 22 21 20 23 22 21 20
    Position: 8 4 2 1 8 4 2 1
    Bits: 0 0 0 1 1 0 1 1
  • Multiply positions with bits for all nibbles and add the results to get the hex values.
  • Results: = (8×0) + (4×0) + (2×0) + (1×1) = (8×1) + (4×0) + (2×1) + (1×1)
    = 0 + 0 + 0 + 1 = 8 + 0 + 2 + 1
    = (1)10 = (11)10
    = (1)16 = (B)16
  • Hex value is:
  • (11011)2 = (1B)16
  • Example 4: Convert (100111.101)2 to Hex value.

  • While converting the binary numbers with binary point, do zero padding on the left side before the binary point and add trailing zeros on the right side after the binary point to make 4-bit groups.
  • Nibble-1 Nibble-2 Nibble-3
    23 22 21 20 23 22 21 20 23 22 21 20
    Position: 8 4 2 1 8 4 2 1 8 4 2 1
    Bits: 0 0 1 0 0 1 1 1. 1 0 1 0
  • Multiply the position values with the bits values, and convert the values to hex.
  • Results: = (8×0)+(4×0)+(2×1)+(1×0) = (8×0)+(4×1)+(2×1)+(1×1) = (8×1)+(4×0)+(2×1)+(1×0)
    = 0 + 0 + 2 + 0 = 0 + 4 + 2 + 1 = 8 + 0 + 2 + 0
    = (2)10 = (7)10. = (10)10
    = (2)16 = (7)16. = (A)16
  • Combine the final results of each nibble to represent the final hex value.
  • (100111.101)2 = (27.A)16
  • Frequently Ask Questions: Binary to Hex Conversion

    Q1: Convert 8-bit signed binary number 11110110 (2's complement) to hexadecimal?

    Group the number into 4 bits: (1111 0110)2 = (F6)16

    Beware of the decimal value here, since MSB = 1 so it is a negative number, Take 2's complement:

    Invert bits: 00001001

    Add 1: 00001001 + 1 = 00001010, so the value is -10 (decimal)

    Q2: How to convert the values 1011.1011 to hex?

    Since (1011)2 = (11)10 = (B)16, Therefore:

    (1011.1011)2 = (B.B)16

    Q3: What are the maximum 4-bit, 8-bit, 12-bit and 16-bit hexadecimal values?

    Max value = 16N - 1 or 24b - 1, as each hex digit N = 4 × b.

    For 4 bits or 1 hex digit, Maximal value = (15)10 = (F)16

    For 8 bits or 2 hex digits, Maximal value = (255)10 = (FF)16

    For 12 bits or 3 hex digits, Maximal value = (4095)10 = (FFF)16

    For 16 bits or 4 hex digits, Maximal value = (65535)10 = (FFFF)16

    Q4: What is the maximum hex value of unsigned 32-bit binary number?

    (11111111111111111111111111111111)2 = (FFFFFFFF)16

    Decimal = 168 - 1 = 4294967295, Here 8 hex digits are used = 32 bits

    Q5: The 8-bit binary number 10101101 is shifted left by 2 bits. Convert the resulting binary number to hexadecimal?

    (10101101)2 is shifted left by 2 bits. Resulting binary number is (10110100)2 (Discard the two overflow bits on the left side in 8-bit arithmetic).

    Group bits into 4-bit groups (nibbles): (1011 0100)2 = (B4)16 in hex.

    Q6: Perform a bitwise AND of 11011011 and 10110110. Represent the result in hexadecimal.

    11011011 AND 10110110 = (10010010)2 = (92)16 in hex.

    Binary to Hexadecimal Table

    BinaryHexadecimal
    000000011
    000000102
    000000113
    000001004
    000001015
    000001106
    000001117
    000010008
    000010019
    00001010A
    00001011B
    00001100C
    00001101D
    00001110E
    00001111F
    0001000010
    0001000111
    0001001012
    0001001113
    0001010014
    0001010115
    0001011016
    0001011117
    0001100018
    0001100119
    000110101A
    000110111B
    000111001C
    000111011D
    000111101E
    000111111F
    0010000020
    0010000121
    0010001022
    0010001123
    0010010024
    0010010125
    0010011026
    0010011127
    0010100028
    0010100129
    001010102A
    001010112B
    001011002C
    001011012D
    001011102E
    001011112F
    0011000030
    0011000131
    0011001032
    0011001133
    0011010034
    0011010135
    0011011036
    0011011137
    0011100038
    0011100139
    001110103A
    001110113B
    001111003C
    001111013D
    001111103E
    001111113F
    0100000040
    BinaryHexadecimal
    0100000141
    0100001042
    0100001143
    0100010044
    0100010145
    0100011046
    0100011147
    0100100048
    0100100149
    010010104A
    010010114B
    010011004C
    010011014D
    010011104E
    010011114F
    0101000050
    0101000151
    0101001052
    0101001153
    0101010054
    0101010155
    0101011056
    0101011157
    0101100058
    0101100159
    010110105A
    010110115B
    010111005C
    010111015D
    010111105E
    010111115F
    0110000060
    0110000161
    0110001062
    0110001163
    0110010064
    0110010165
    0110011066
    0110011167
    0110100068
    0110100169
    011010106A
    011010116B
    011011006C
    011011016D
    011011106E
    011011116F
    0111000070
    0111000171
    0111001072
    0111001173
    0111010074
    0111010175
    0111011076
    0111011177
    0111100078
    0111100179
    011110107A
    011110117B
    011111007C
    011111017D
    011111107E
    011111117F
    1000000080
    BinaryHexadecimal
    1000000181
    1000001082
    1000001183
    1000010084
    1000010185
    1000011086
    1000011187
    1000100088
    1000100189
    100010108A
    100010118B
    100011008C
    100011018D
    100011108E
    100011118F
    1001000090
    1001000191
    1001001092
    1001001193
    1001010094
    1001010195
    1001011096
    1001011197
    1001100098
    1001100199
    100110109A
    100110119B
    100111009C
    100111019D
    100111109E
    100111119F
    10100000A0
    10100001A1
    10100010A2
    10100011A3
    10100100A4
    10100101A5
    10100110A6
    10100111A7
    10101000A8
    10101001A9
    10101010AA
    10101011AB
    10101100AC
    10101101AD
    10101110AE
    10101111AF
    10110000B0
    10110001B1
    10110010B2
    10110011B3
    10110100B4
    10110101B5
    10110110B6
    10110111B7
    10111000B8
    10111001B9
    10111010BA
    10111011BB
    10111100BC
    10111101BD
    10111110BE
    10111111BF
    11000000C0
    BinaryHexadecimal
    11000001C1
    11000010C2
    11000011C3
    11000100C4
    11000101C5
    11000110C6
    11000111C7
    11001000C8
    11001001C9
    11001010CA
    11001011CB
    11001100CC
    11001101CD
    11001110CE
    11001111CF
    11010000D0
    11010001D1
    11010010D2
    11010011D3
    11010100D4
    11010101D5
    11010110D6
    11010111D7
    11011000D8
    11011001D9
    11011010DA
    11011011DB
    11011100DC
    11011101DD
    11011110DE
    11011111DF
    11100000E0
    11100001E1
    11100010E2
    11100011E3
    11100100E4
    11100101E5
    11100110E6
    11100111E7
    11101000E8
    11101001E9
    11101010EA
    11101011EB
    11101100EC
    11101101ED
    11101110EE
    11101111EF
    11110000F0
    11110001F1
    11110010F2
    11110011F3
    11110100F4
    11110101F5
    11110110F6
    11110111F7
    11111000F8
    11111001F9
    11111010FA
    11111011FB
    11111100FC
    11111101FD
    11111110FE
    11111111FF

    by Wasim Khan and it was last modified on

    Related Conversions

    Please find the related numeric conversions.