Skip to main content
other

Binary to Decimal Converter

Convert between binary (base 2) and decimal (base 10) numbers. Essential for computer science, networking, and digital electronics.

Reviewed by Christopher FloiedPublished Updated

This free online binary to decimal converter provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

Results

Decimal Value

42

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Binary to Decimal Converter. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Binary to Decimal Converter instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Binary to Decimal Converter Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Binary to Decimal Converter when you need accurate results quickly without the risk of manual computation errors or unit conversion mistakes.
  • Use it to verify calculations made by hand or in spreadsheets — an independent check can catch errors before they lead to costly decisions.
  • Use it to explore how changing input parameters affects the output — a quick way to develop intuition and identify the most influential variables.
  • Use it when collaborating with others to ensure everyone is working from the same numbers and applying the same assumptions.

About This Calculator

The Binary to Decimal Converter is a free, browser-based calculation tool for engineers, students, and technical professionals. Convert between binary (base 2) and decimal (base 10) numbers. Essential for computer science, networking, and digital electronics. It implements standard formulas and supports both metric (SI) and imperial unit systems with automatic unit conversion. All calculations are performed instantly in your browser with no data sent to a server. Use this calculator as a quick reference and sanity-check tool during design, analysis, and learning. Always verify results against primary engineering references and applicable standards for any safety-critical application.

About Binary to Decimal Converter

The Binary to Decimal Converter helps you convert between the number systems that power all digital computing. Computers use binary (base 2), which consists of only 0s and 1s, because transistors have two states: on and off. Decimal (base 2) is what humans use daily. Understanding binary is essential for anyone studying computer science, electrical engineering, networking (subnetting uses binary), digital electronics, or programming. The concept extends to hexadecimal (base 16) and octal (base 8) systems, all of which are easier to convert from binary than decimal. This calculator handles the fundamental conversion between these number systems.

The Math Behind It

Binary is the number system that all computers use internally. Understanding how to convert between binary and decimal is fundamental to computer science. **Binary Basics**: - Uses only two digits: 0 and 1 - Each digit is called a 'bit' (binary digit) - 8 bits = 1 byte - Each position represents a power of 2 **Positional Values (right to left)**: | Position | Power | Value | |----------|-------|-------| | 0 | 2⁰ | 1 | | 1 | 2¹ | 2 | | 2 | 2² | 4 | | 3 | 2³ | 8 | | 4 | 2⁴ | 16 | | 5 | 2⁵ | 32 | | 6 | 2⁶ | 64 | | 7 | 2⁷ | 128 | | 8 | 2⁸ | 256 | | 9 | 2⁹ | 512 | | 10 | 2¹⁰ | 1,024 | | 16 | 2¹⁶ | 65,536 | | 20 | 2²⁰ | 1,048,576 | | 30 | 2³⁰ | 1,073,741,824 | | 32 | 2³² | 4,294,967,296 | **Converting Binary to Decimal**: 1. Write positional values above each bit 2. Add positional values where bit is 1 **Example**: Convert 1010₂ to decimal - Position: 3 2 1 0 - Value: 8 4 2 1 - Bits: 1 0 1 0 - Calculation: 8 + 0 + 2 + 0 = 10 So 1010₂ = 10₁₀ **Converting Decimal to Binary**: Method 1: Division by 2 1. Divide number by 2 2. Note the remainder 3. Repeat with quotient 4. Read remainders from bottom up **Example**: Convert 25 to binary - 25 ÷ 2 = 12 remainder 1 - 12 ÷ 2 = 6 remainder 0 - 6 ÷ 2 = 3 remainder 0 - 3 ÷ 2 = 1 remainder 1 - 1 ÷ 2 = 0 remainder 1 Read bottom to top: 11001₂ = 25₁₀ **Method 2: Subtract Powers of 2** 1. Find largest power of 2 ≤ number 2. Subtract it, place 1 in that position 3. Repeat with remainder 4. Place 0 in unused positions **Common Conversions**: | Decimal | Binary | |---------|--------| | 0 | 0 | | 1 | 1 | | 2 | 10 | | 3 | 11 | | 4 | 100 | | 5 | 101 | | 8 | 1000 | | 10 | 1010 | | 16 | 10000 | | 32 | 100000 | | 50 | 110010 | | 100 | 1100100 | | 128 | 10000000 | | 255 | 11111111 | | 256 | 100000000 | | 1024 | 10000000000 | **Why Computers Use Binary**: 1. **Electronic simplicity**: Just two states (on/off, high/low voltage) 2. **Error resistance**: Clear distinction between states 3. **Speed**: Simple logic gates (AND, OR, NOT) 4. **Standardization**: Universal across all digital devices 5. **Mathematical foundation**: Boolean algebra **Bits and Bytes**: - **Bit**: 1 binary digit (0 or 1) - **Nibble**: 4 bits - **Byte**: 8 bits - **Kilobyte (KB)**: 1,024 bytes (10 bits) - **Megabyte (MB)**: 1,048,576 bytes (20 bits) - **Gigabyte (GB)**: 1,073,741,824 bytes (30 bits) - **Terabyte (TB)**: 1,099,511,627,776 bytes - **Petabyte (PB)**: 1,125,899,906,842,624 bytes **Note**: Storage manufacturers often use decimal (1,000,000 bytes/MB), while computer memory uses binary (1,048,576 bytes/MB). This is why advertised hard drive capacity appears smaller in the operating system. **Maximum Values by Bits**: - 4 bits: 0 to 15 (16 values) - 8 bits: 0 to 255 (256 values) - 16 bits: 0 to 65,535 (65,536 values) - 32 bits: 0 to 4,294,967,295 (~4 billion) - 64 bits: 0 to 1.8 × 10¹⁹ **Signed Numbers** (two's complement): Computers represent negative numbers using two's complement: - 8-bit signed: -128 to +127 - 16-bit signed: -32,768 to +32,767 - 32-bit signed: -2,147,483,648 to +2,147,483,647 The leftmost bit is the sign bit. **Hexadecimal (Base 16)**: Easier to read than binary — 4 bits = 1 hex digit: | Binary | Decimal | Hex | |--------|---------|-----| | 0000 | 0 | 0 | | 0001 | 1 | 1 | | 0010 | 2 | 2 | | ... | ... | ... | | 1001 | 9 | 9 | | 1010 | 10 | A | | 1011 | 11 | B | | 1100 | 12 | C | | 1101 | 13 | D | | 1110 | 14 | E | | 1111 | 15 | F | Examples: - 11111111₂ = FF₁₆ = 255₁₀ - 00010000₂ = 10₁₆ = 16₁₀ - 10101010₂ = AA₁₆ = 170₁₀ **Real-World Uses**: **IP Addresses (IPv4)**: - 4 octets of 8 bits each = 32 bits total - 192.168.1.1 = 11000000.10101000.00000001.00000001 **Subnet Masks**: - /24 means first 24 bits are network - 255.255.255.0 = 11111111.11111111.11111111.00000000 **MAC Addresses**: - 48 bits (6 bytes) in hex - Example: 00:1A:2B:3C:4D:5E **Colors (HTML/CSS)**: - RGB: 3 bytes = 24 bits = 16.7 million colors - White: #FFFFFF = 11111111 11111111 11111111 - Black: #000000 = 00000000 00000000 00000000 - Red: #FF0000 = 11111111 00000000 00000000 **ASCII Characters**: - 7-bit code (128 characters originally) - Extended to 8-bit (256 characters) - 'A' = 65 = 01000001 - 'a' = 97 = 01100001 - '0' = 48 = 00110000 - Space = 32 = 00100000 **Unicode**: - 21-bit code points (supports all languages) - UTF-8 encoding uses 1-4 bytes per character - Over 144,000 characters defined **Bitwise Operations**: Computers operate on binary with these operators: - **AND**: 1&1=1, others=0 (masking) - **OR**: 0|0=0, others=1 (setting bits) - **XOR**: Same=0, different=1 (toggling) - **NOT**: Flip all bits - **Shift left**: Multiply by 2 - **Shift right**: Divide by 2 **Common Binary Patterns**: - **All 0s**: Zero (0) - **All 1s**: Maximum value (255 for 8-bit) - **Leading 1**: Negative (signed) or large positive (unsigned) - **Alternating 10**: Often used as test patterns **Practical Tip**: To quickly convert small numbers: Learn powers of 2 by heart. Any number < 256 can be converted in seconds by subtracting powers.

Formula Reference

Binary Value

d = Σ bit × 2^position

Variables: Each bit's positional value doubles

Positional Values

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048...

Variables: Powers of 2

Worked Examples

Example 1: Decimal to Binary

Convert 42 to binary.

Step 1:Largest power of 2 ≤ 42: 32 (2⁵)
Step 2:42 - 32 = 10
Step 3:Largest power of 2 ≤ 10: 8 (2³)
Step 4:10 - 8 = 2
Step 5:Largest power of 2 ≤ 2: 2 (2¹)
Step 6:2 - 2 = 0
Step 7:Binary: 101010 (positions 5, 3, 1)
Step 8:Verify: 32 + 8 + 2 = 42 ✓

42₁₀ = 101010₂. This is the binary representation used by computers internally.

Example 2: Binary to Decimal

Convert 10110101₂ to decimal.

Step 1:Positions: 7 6 5 4 3 2 1 0
Step 2:Values: 128 64 32 16 8 4 2 1
Step 3:Bits: 1 0 1 1 0 1 0 1
Step 4:Sum ones: 128 + 32 + 16 + 4 + 1 = 181

10110101₂ = 181₁₀. This is exactly how computers interpret the byte pattern in their memory.

Common Mistakes & Tips

  • !Forgetting that binary positions represent powers of 2, not multiples of 2.
  • !Reading binary left-to-right instead of right-to-left for positional values.
  • !Confusing signed (negative possible) with unsigned (positive only) interpretations.
  • !Forgetting that KB (binary) = 1024 bytes, not 1000 bytes (decimal).

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

Why do computers use binary?

Because binary has only two states (0 and 1), which maps perfectly to electronic circuits that have two clear states: on/off, high/low voltage, magnetic north/south, etc. This simplicity makes circuits faster, more reliable, and easier to build. Converting numbers between binary and decimal is purely for human convenience — computers never actually use decimal internally.

How many bits are in a byte?

Always 8 bits. This has been standardized since the 1950s when IBM's System/360 established the 8-bit byte. Before that, bytes varied from 6 to 12 bits. The 8-bit standard was chosen because it's enough to represent ASCII characters (7-bit) plus extended characters, and it's a power of 2. All modern computing uses 8-bit bytes.

What's the difference between KB and KiB?

KB (kilobyte) can mean 1000 bytes (decimal, used by storage manufacturers) or 1024 bytes (binary, used by operating systems). KiB (kibibyte) explicitly means 1024 bytes to avoid confusion. This distinction causes the discrepancy between advertised drive sizes and actual capacity shown in your computer — a '1 TB' drive is actually ~0.91 TiB.

Can I do math in binary?

Yes, binary arithmetic follows the same rules as decimal but with only 0 and 1. Addition: 0+0=0, 0+1=1, 1+0=1, 1+1=10 (carry 1). Subtraction: similar with borrowing. Multiplication: 0×0=0, 0×1=0, 1×1=1 (essentially AND operation). Computers do all their math this way internally, which is why they're so fast — the rules are simpler than decimal.