Calculate Tools
STUDENTS
Free Online Tool

Binary to Decimal Converter

Convert binary numbers (Base 2) to decimal (Base 10), hexadecimal (Base 16), and octal (Base 8). Features powers-of-2 positional breakdown.

Enter binary digits (0 and 1 only). Spaces are automatically ignored.

Quick Binary Presets

Decimal Result

214

Binary: 11010110 (8 bits)

Decimal (Base 10)
214
Hexadecimal (Base 16)
0xD6
Octal (Base 8)
0o326
Bit Length
8 bits
Positional Powers of 2 Expansion
2^7 (128)2^6 (64)2^5 (0)2^4 (16)2^3 (0)2^2 (4)2^1 (2)2^0 (0)

About the Binary to Decimal Converter

The Binary to Decimal Converter translates binary numbers (Base 2) into standard decimal integers (Base 10), hexadecimal (Base 16), and octal (Base 8). Built using arbitrary-precision BigInt logic, it handles binary numbers of any bit-length without floating-point precision loss and provides an interactive positional powers-of-2 breakdown.

How to Use the Binary to Decimal Converter

Step-by-Step Instructions

  1. Enter your binary number consisting of 0s and 1s.
  2. Spaces and underscores are automatically stripped for convenience.
  3. Review the calculated decimal value, hexadecimal representation, and octal equivalent.
  4. Inspect the positional powers-of-2 expansion table showing the contribution of each bit.

Input Fields Explained

Field NameDescriptionRequirementDefault
Binary InputBase 2 digits (only 0 and 1 allowed).
Required
—

How to Interpret the Output

The primary result displays the standard decimal integer (Base 10). Grid metrics provide hexadecimal (0x) and octal (0o) formats.

Assumption: Input must contain strictly binary digits (0 and 1). Non-binary characters are rejected.

Binary to Decimal Converter Formula & Calculation Method

Decimal = Σ [ b_i × 2^i ] for i = 0 to N − 1

Variable Definitions

  • b_i— Binary bit (0 or 1) at position i
  • 2^i— Weight of position i (1, 2, 4, 8, 16, 32...)

Each bit in a binary number represents an increasing power of 2 from right to left (2^0, 2^1, 2^2, 2^3...). Multiplying each bit by its positional power of 2 and summing the products produces the decimal equivalent.

Worked Calculation Example

Converting Binary 11010 to Decimal

Convert binary 11010 to Base 10.

Step-by-Step Calculation:
  • Bit 4 (1): 1 × 2^4 = 16.
  • Bit 3 (1): 1 × 2^3 = 8.
  • Bit 2 (0): 0 × 2^2 = 0.
  • Bit 1 (1): 1 × 2^1 = 2.
  • Bit 0 (0): 0 × 2^0 = 0.
  • Sum: 16 + 8 + 0 + 2 + 0 = 26.
Final Result: Decimal: 26 (Hex: 0x1A | Octal: 0o32)

Practical Real-World Use Cases

Computer Science & Programming

Inspect memory addresses, bitmasks, and binary permissions (such as Linux chmod 755).

Networking & IP Subnetting

Convert binary IPv4 octets and subnet masks into decimal dotted-quad notation.

Microcontroller & Hardware Engineering

Program microcontroller GPIO registers and digital logic sensors.

Important Notes & Limitations

  • Standard unsigned binary representation is assumed.
  • Arbitrary-precision BigInt arithmetic guarantees exact conversion even for 64-bit and 128-bit numbers.
  • Each group of 4 binary bits maps directly to 1 hexadecimal digit.

Frequently Asked Questions about Binary to Decimal Converter

How do you convert binary to decimal manually?

Write down the powers of 2 (1, 2, 4, 8, 16, 32, 64...) under each binary digit from right to left. Add together the powers of 2 that align with a '1' digit.

Why do computers use binary?

Transistors inside computer processors have two physical electrical states: ON (voltage high, represented by 1) and OFF (voltage low, represented by 0). Binary is the most reliable representation for physical electronic switches.

What is 11111111 in decimal?

11111111 in binary equals 255 in decimal. It represents the maximum value that can be stored in an 8-bit byte (2^8 − 1).

How do binary and hexadecimal relate?

Hexadecimal (base 16) is human-friendly shorthand for binary. Every 4 binary bits (a nibble) correspond exactly to one hexadecimal character (0–9, A–F). For example, 1111 0000 = 0xF0.

Related Calculators