Conversion

Hexadecimal to binary converter

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is the hexadecimal number system?

The hexadecimal number system (base 16) is a positional numeral system that uses 16 symbols to represent values. These symbols are:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Here, the letters A to F represent the decimal numbers 10 to 15 respectively. Because each digit can represent sixteen different values, the hexadecimal system is very compact and convenient for use in computing. It is frequently used in programming and digital electronics because it aligns neatly with the binary system.

Each hexadecimal digit directly corresponds to a 4-bit binary number. For example: A₁₆ = 1010₂,
F₁₆ = 1111₂

This makes conversion between hexadecimal and binary particularly straightforward.

What is the binary number system?

The binary number system (base 2) uses only two symbols: 0 and 1. Each binary digit (bit) represents a power of two depending on its position in the sequence.

For example: 10102=1×23+0×22+1×21+0×20=8+0+2+0=10101010_2 = 1×2^3 + 0×2^2 + 1×2^1 + 0×2^0 = 8 + 0 + 2 + 0 = 10_{10}

Binary is the foundation of computer operations since all digital data and logic are represented electronically using two states: ON (1) or OFF (0).

Conversion from hexadecimal to binary

The process of converting from hexadecimal to binary is direct, because each hexadecimal digit can be replaced by an exact 4-bit binary equivalent.

Example for reference:

HexBinary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
A1010
B1011
C1100
D1101
E1110
F1111

Example

Convert 5B165B_{16} to binary:

5 → 0101 B → 1011

5B16=0101101125B_{16} = 01011011_2 or excluding the leading zero 5B16=101101125B_{16} = 1011011_2

Conversion through decimal

First, transform the hexadecimal number into the decimal system:

– Each digit of the hexadecimal number is multiplied by base 16 raised to the power of its position index nn, where n=0n = 0 is the rightmost digit.
– Then all results are summed.

Example:

816=8×160=8108_{16} = 8 \times 16^0 = 8_{10}

Now convert from decimal to binary:

– Divide the decimal number by 2 repeatedly, writing down the remainder each time, until the quotient becomes zero.
– Record the remainders in reverse order.

DivisionQuotientRemainder
8 ÷ 240
4 ÷ 220
2 ÷ 210
1 ÷ 201
810=100028_{10} = 1000_2

Hence, 816=100028_{16} = 1000_2

This example shows the principle for any hexadecimal number — however, to simplify the procedure, we can directly substitute each hex digit with its 4-bit equivalent.

Practical applications

Converting hexadecimal values to binary is common when:

  • Debugging or analyzing digital circuits
  • Inspecting machine code or memory addresses in computing
  • Working with color codes in web design (for instance, the color #FF6600 corresponds to binary 111111110110011000000000)
  • Encoding and decoding data in communication protocols

Notes

  • Each hexadecimal digit always corresponds to exactly four binary digits, so the total binary number length is always four times the number of hexadecimal digits.
  • Removing leading zeros after conversion does not change the numeric value.
  • Hexadecimal simplifies large binary sequences, making them easier to read and interpret.

Frequently Asked Questions

How to convert a hexadecimal number like 1A₁₆ to binary?

Replace each digit with its 4-bit equivalent:
1 → 0001, A → 1010
Thus, 1A16=0001101021A_{16} = 00011010_2 or excluding the leading zero 1A16=1101021A_{16} = 11010_2

How many binary digits correspond to one hexadecimal digit?

Each hexadecimal digit equals four binary digits (bits).

How to check if a conversion from hex to binary is correct?

You can convert both the hexadecimal and binary results into decimal. If both decimal values match, the conversion is correct.

Can fractional hexadecimal numbers be converted to binary?

Yes. Hexadecimal fractions can also be converted digit-by-digit from hexadecimal to binary.

Why is hexadecimal often used instead of binary?

Because it is more compact and easier for humans to read while maintaining a simple one-to-one mapping to binary — every 4 bits equal 1 hex digit.

Report a bug

This field is required.