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

Understanding Hexadecimal

Hexadecimal (often called "hex") is a base-16 number system that uses sixteen digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). It's widely used in computing because it provides a compact, human-readable way to represent binary data.

Hexadecimal is a positional number system, just like decimal. But instead of each position representing a power of 10 (1, 10, 100, 1000...), each position represents a power of 16 (1, 16, 256, 4096...). The rightmost position is 16⁰ (1), next is 16¹ (16), then 16² (256), then 16³ (4096), and so on.

Hexadecimal position values: ... 4096 256 16 1

To convert hexadecimal to decimal, you multiply each digit by its position value and add up the results. For digits A-F, you first convert them to their decimal equivalents (10-15).

Step-by-Step Conversion Method

Here's exactly how to convert hexadecimal to decimal using the positional value method:

  1. Write down the hexadecimal number - For example, 2A7
  2. Convert any letters to numbers - A=10, B=11, C=12, D=13, E=14, F=15
  3. Number the positions from right to left - Start with 0 on the right
  4. Multiply each digit by 16 raised to its position - Use 16⁰, 16¹, 16², etc.
  5. Add up all the results - The sum is the decimal equivalent

Complete example: Convert 2A7 to decimal

Step 1: Hexadecimal number - 2A7

Step 2: Convert letters - A = 10

Step 3: Number the positions

Digits: 2 A 7

Position: 2 1 0 (from right to left)

Step 4: Multiply each digit

Position 0: 7 × 16⁰ = 7 × 1 = 7

Position 1: 10 × 16¹ = 10 × 16 = 160

Position 2: 2 × 16² = 2 × 256 = 512

Step 5: Add them up

7 + 160 + 512 = 679

Result: 2A7 in hexadecimal = 679 in decimal

Our converter shows you these steps for any hexadecimal number you enter, including the conversion of letters A-F to numbers 10-15.

Hexadecimal Digit Values

Here's the complete hexadecimal digit system:

HexadecimalDecimal ValueBinary (4-bit)
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111

Notice that each hexadecimal digit corresponds to exactly four binary digits. This makes hex-to-binary and binary-to-hex conversions very straightforward.

Common Hexadecimal to Decimal Conversions

Here are important hexadecimal numbers and their decimal equivalents:

HexadecimalDecimalWhat It Represents
00Zero
11One
A10Ten (first letter)
F15Fifteen (largest single hex digit)
1016Sixteen (first "carry" in hex)
FF255Maximum 8-bit value
100256256 (16²)
FFF4095Maximum 12-bit value
100040964096 (16³)
FFFF65535Maximum 16-bit value
FFFFFF16777215Maximum 24-bit value
DEADBEEF3735928559Famous debug value ("dead beef")

Try converting these hexadecimal numbers using our converter to practice!

Hexadecimal in Web Colors

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:

Understanding web color codes

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 = 255 red, 136 green, 0 blue = Orange

ColorHexadecimalDecimal (R,G,B)
Red#FF0000255, 0, 0
Green#00FF000, 255, 0
Blue#0000FF0, 0, 255
Yellow#FFFF00255, 255, 0
White#FFFFFF255, 255, 255
Black#0000000, 0, 0

Hexadecimal in Programming

Programmers use hexadecimal extensively because:

Hexadecimal in different programming languages

C/C++/Java/JavaScript: 0x prefix (0xFF = 255)

Python: 0x prefix (0xFF = 255)

HTML/CSS: # prefix for colors (#FF0000 = red)

Assembly: Often uses h suffix or 0x prefix