Convert binary to decimal: formula, table and examples
Learn to convert a binary number to decimal with our step-by-step method, reference table and online tool.
Published on January 21, 2026Binary-to-decimal conversion is fundamental in computing, electronics and networking. Understanding how computers represent numbers in base 2 is essential for any developer, whether for network masks, bitwise operations or understanding the internal workings of a processor.
Understanding the conversion
A binary number is expressed in base 2: each digit (bit) is 0 or 1, and its actual value depends on its position. The rightmost bit is worth 2⁰ = 1, the next is worth 2¹ = 2, then 2² = 4, 2³ = 8, etc. To convert to decimal, multiply each bit by its position value and add up the results.
📐 Formula
📊 Conversion table
| Binary | Decimal | Detailed calculation |
|---|---|---|
| 0001 | 1 | 1×2⁰ = 1 |
| 0010 | 2 | 1×2¹ = 2 |
| 0100 | 4 | 1×2² = 4 |
| 0111 | 7 | 1×2² + 1×2¹ + 1×2⁰ = 4+2+1 |
| 1000 | 8 | 1×2³ = 8 |
| 1010 | 10 | 1×2³ + 1×2¹ = 8+2 |
| 1111 | 15 | 8+4+2+1 |
| 10000000 | 128 | 1×2⁷ |
| 11111111 | 255 | 128+64+32+16+8+4+2+1 |
💡 Practical examples
1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11. The binary number 1011 corresponds to 11 in decimal.
A byte of 8 bits all set to 1 equals 1×128 + 1×64 + 1×32 + 1×16 + 1×8 + 1×4 + 1×2 + 1×1 = 255. This is the value of the /8 mask in CIDR notation.
The binary byte 11000000 corresponds to 1×128 + 1×64 = 192. This is the first byte of the 192.168.x.x range (private network).