Binary to Decimal Converter

Convert binary numbers (0s and 1s) to decimal with our step-by-step calculator. Learn the positional value method, see detailed examples, and understand how computers store numbers.

Calculation Steps

Why Binary to Hexadecimal?

Binary to hexadecimal conversion is one of the most important conversions in computing. Hexadecimal provides a compact, human-readable way to represent binary data. Each hexadecimal digit represents exactly four binary digits (bits), making conversions straightforward.

This relationship exists because 16 (hexadecimal base) is 2⁴ (binary base to the fourth power). This means four binary digits have exactly 16 possible combinations (0000 to 1111), which correspond perfectly to the 16 hexadecimal digits (0-9 and A-F).

4 binary digits = 1 hexadecimal digit

16 (hexadecimal) = 2⁴ (binary)

Hexadecimal is used everywhere in computing: memory addresses, color codes, debugging output, network addresses, and more. Understanding binary to hex conversion is essential for anyone working with computers at more than a basic level.

Step-by-Step Grouping Method

Converting binary to hexadecimal uses the grouping method. Here's exactly how it works:

  1. Write down the binary number - For example, 101110101
  2. Group digits into sets of four - Start from the rightmost digit
  3. Add leading zeros if needed - If the leftmost group has less than 4 digits, add zeros to make 4
  4. Convert each group to hexadecimal - Use the binary-to-decimal conversion, then convert 10-15 to A-F
  5. Write the hexadecimal digits in order - Left to right, same order as the groups

Complete example: Convert 101110101 to hexadecimal

Step 1: Binary number - 101110101

Step 2: Group into fours from right

101110101 becomes: 1 0111 0101

Step 3: Add leading zero

First group only has 1 digit, so add three zeros: 0001 0111 0101

Step 4: Convert each group

0001 in binary = 1 in decimal = 1 in hexadecimal

0111 in binary = 7 in decimal = 7 in hexadecimal

0101 in binary = 5 in decimal = 5 in hexadecimal

Step 5: Write hexadecimal digits

Result: 175 in hexadecimal

So 101110101 in binary = 175 in hexadecimal

Our converter shows you these grouping and conversion steps for any binary number.

Binary to Hexadecimal Conversion Table

Since there are only 16 possible 4-bit combinations, you can memorize this table:

4-bit BinaryHexadecimalDecimal
000000
000111
001022
001133
010044
010155
011066
011177
100088
100199
1010A10
1011B11
1100C12
1101D13
1110E14
1111F15

Once you know this table, binary to hexadecimal conversion becomes very fast. Just group bits into fours and look up each group in the table!

Common Binary to Hexadecimal Conversions

Here are important binary numbers and their hexadecimal equivalents:

BinaryHexadecimalWhat It Represents
00Zero
11One
102Two
113Three
1004Four
1015Five
1106Six
1117Seven
10008Eight
10019Nine
1010ATen (first letter)
1011BEleven
1100CTwelve
1101DThirteen
1110EFourteen
1111FFifteen (largest single hex digit)
11111111FF255 in decimal, maximum 8-bit value
1111111111111111FFFF65535 in decimal, maximum 16-bit value

Hexadecimal in Web Design (Color Codes)

One of the most common uses of hexadecimal is in web color codes. Colors on the web are specified using a # followed by six hexadecimal digits representing red, green, and blue components:

How web color codes work

Format: #RRGGBB

RR = Red component (00 to FF, or 0 to 255 in decimal)

GG = Green component (00 to FF, or 0 to 255 in decimal)

BB = Blue component (00 to FF, or 0 to 255 in decimal)

Example: #FF8800 = Orange (full red, half green, no blue)

ColorHexadecimalBinary (24-bit)
Red#FF000011111111 00000000 00000000
Green#00FF0000000000 11111111 00000000
Blue#0000FF00000000 00000000 11111111
White#FFFFFF11111111 11111111 11111111
Black#00000000000000 00000000 00000000

Hexadecimal in Programming and Debugging

Programmers use hexadecimal extensively because:

Hexadecimal in programming languages

In C/C++/Java/JavaScript: hex numbers start with 0x

0xFF = 255

0x10 = 16

0x1A = 26 (1×16 + 10)

0xDEADBEEF = 3,735,928,559 (a famous debug value)