Conversion

Binary to hexadecimal 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 binary number system?

The binary number system is one of the most fundamental systems in computer science and digital electronics. It uses only two digits — 0 and 1 — to represent all possible numbers. Each digit in a binary number is called a “bit.” Binary is the natural language of computers because all modern digital devices use two states (on and off, represented by 1 and 0) to store and process data.

For example:

  • Decimal 2 in binary is written as 10.
  • Decimal 7 in binary is 111.

Each digit’s position in binary represents a power of 2:

Binary value=bn×2n+bn1×2n1+...+b1×21+b0×20\text{Binary value} = b_n \times 2^n + b_{n-1} \times 2^{n-1} + ... + b_1 \times 2^1 + b_0 \times 2^0

where bib_i can be 0 or 1.

What is the hexadecimal number system?

The hexadecimal system (or simply “hex”) is a base-16 system. It consists of 16 digits — from 0 to 9 and then A to F (representing decimal values 10 to 15). It is widely used in programming, memory addressing, and computer graphics because it allows compact representation of large binary numbers.

Hex digitDecimal value
00
11
22
33
44
55
66
77
88
99
A10
B11
C12
D13
E14
F15

For example:

  • Decimal 255 = FF in hexadecimal.
  • Decimal 64 = 40 in hexadecimal.

Formula for conversion

Binary numbers can be directly grouped and converted into hexadecimal numbers because both are powers of two:

16=2416 = 2^4

This means one hexadecimal digit represents exactly four binary digits (bits). The step-by-step conversion process is as follows:

  1. Group the binary digits in sets of four, starting from the right (add leading zeros if necessary).
  2. Convert each group of four bits into its corresponding hexadecimal value.
  3. Combine all hexadecimal digits into a single hexadecimal number.

Conversion table of 4-bit groups

BinaryHexadecimal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F

Examples

You can use two conversion methods. Let’s look at them with examples.

Example 1: Convert binary 1101101 to hexadecimal

Step 1: Group into 4-bit sets (from right to left)
Binary number: 0110 1101

Step 2: Convert each group using the table
0110 → 6
1101 → D

Answer:
Binary 1101101 = Hexadecimal 6D

Division ProcessQuotientRemainder in Decimal → Hex
109 ÷ 16613 → D
6 ÷ 1606

The result is 6D.

Example 2: Convert binary 101101001010 to hexadecimal

Step 1: Convert to decimal

1011010010102=1×211+0×210+1×29+1×28+0×27+1×26+0×25+0×24+1×23+0×22+1×21+0×20=289010101101001010_2 = 1 \times 2^{11} + 0 \times 2^{10} + 1 \times 2^9 + 1 \times 2^8 + 0 \times 2^7 + 1 \times 2^6 + 0 \times 2^5 + 0 \times 2^4 + 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 = 2890_{10}

Step 2: Convert to hexadecimal

289010=708A162890_{10} = 708A_{16}
Division ProcessQuotientRemainder in Decimal → Hex
2890 ÷ 1618010 → A
180 ÷ 16114
11 ÷ 16011 → B

This gives the result B4A, confirming equivalence with binary.

Why binary and hexadecimal are used in computing

Computers use binary internally because it is easy to represent two states physically (electric current on or off). However, binary numbers can become very long. Representing large binary numbers in hexadecimal form significantly shortens them and improves readability for programmers.

For example:

  • Binary: 1111 1111 1111 1111
  • Hexadecimal: FFFF

Both represent the same value but the hex form is shorter and easier to interpret.

Frequently asked questions

How to convert a binary number like 11110000 to hexadecimal?

Group into sets of 4 bits: 1111 0000
1111 → F, 0000 → 0
Therefore, the result is F0.

How many hexadecimal digits are needed to represent 8 binary digits?

Since 1 hex digit represents 4 bits, 8 binary digits require 8 ÷ 4 = 2 hexadecimal digits.

Why do hexadecimal digits go up to F?

Hex uses base 16, so after 9, letters A-F represent decimal values 10 to 15 to fill the 16 possible symbol positions.

How does the grouping method simplify conversion?

Direct grouping into 4-bit segments avoids converting binary to decimal first, making the process faster and less error-prone.

Can binary fractions be converted to hexadecimal too?

Yes, fractional binary numbers can also be converted. Group the bits on both sides of the decimal point separately into sets of four and then convert each group. For example, binary 1010.1101 = hex A.D.

Report a bug

This field is required.