Binary to Decimal Converter Formula
Understand the math behind the binary to decimal converter. Each variable explained with a worked example.
Formulas Used
Decimal Value
decimal = bit7 * 128 + bit6 * 64 + bit5 * 32 + bit4 * 16 + bit3 * 8 + bit2 * 4 + bit1 * 2 + bit0 * 1Variables
| Variable | Description | Default |
|---|---|---|
bit7 | Bit 7 (128s) | 0 |
bit6 | Bit 6 (64s) | 0 |
bit5 | Bit 5 (32s) | 0 |
bit4 | Bit 4 (16s) | 1 |
bit3 | Bit 3 (8s) | 0 |
bit2 | Bit 2 (4s) | 1 |
bit1 | Bit 1 (2s) | 0 |
bit0 | Bit 0 (1s) | 1 |
How It Works
Binary to Decimal Converter
How It Works
Each binary digit (bit) represents a power of 2. From right to left:
Multiply each bit by its place value and sum all the results.
Worked Example
Convert binary 00010101 to decimal.
- 010×128 + 0×64 + 0×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1
- 02= 0 + 0 + 0 + 16 + 0 + 4 + 0 + 1
- 03= 21 in decimal
Frequently Asked Questions
What is binary?
Binary is a base-2 number system that uses only two digits: 0 and 1. It is the fundamental language of computers.
How do I read a binary number?
Read each digit from right to left. Each position represents a power of 2 (1, 2, 4, 8, 16, ...). Add up the values where the digit is 1.
Learn More
Guide
Data Storage Units Guide: Bits, Bytes, Megabytes, Gigabytes, and Beyond
Understand data storage units from bits to yottabytes. Learn the difference between decimal and binary prefixes, how to convert between units, and practical storage guidance.
Ready to run the numbers?
Open Binary to Decimal Converter