CalcUnit Logo
Converters

Understanding Binary: How to Convert Base-2 to Decimal

Learn how to read the language of computers. We explain the Base-2 binary numbering system and the mathematical algorithm to convert 1s and 0s into human numbers.

CSBy CalcUnit Computer Science ExpertsPublished 8 min read
Understanding Binary: How to Convert Base-2 to Decimal

Instantly translate computer code into readable numbers using our Binary to Decimal Converter, or read on to learn how to do the math yourself.

Every video you watch, song you stream, and text message you send is ultimately broken down into a series of 1s and 0s. This is the Binary Numeral System (Base-2).

Unlike humans, who count using 10 digits (Base-10), computers rely on millions of microscopic transistors. A transistor only has two physical states: Off (0) or On (1). Therefore, computers must use a counting system that relies entirely on two digits.

Humans likely settled on ten digits because we have ten fingers. Computers settled on two because a switch is either open or closed — and everything in this guide follows from that single physical fact.

The Difference Between Base-10 and Base-2

In the human Base-10 system, each position in a number represents a power of 10. In the number 345:

  • The right slot is the "1s" column (10^0). 5 × 1 = 5
  • The middle slot is the "10s" column (10^1).

4 × 10 = 40

  • The left slot is the "100s" column (10^2). 3 × 100 = 300
  • Total: 300 + 40 + 5 = 345

In the computer Base-2 system, each position represents a power of 2. Reading from right to left, the column values are: 1, 2, 4, 8, 16, 32, 64, 128...

The deep insight is that the method is identical in both systems. Multiply each digit by its column value, then add. Only the column values change: powers of ten for us, powers of two for machines.

Memorize the first eight powers of two and you can convert any byte in your head: 1, 2, 4, 8, 16, 32, 64, 128. Each is simply double the previous one.

Run your own numbers

Enter your own numbers and see the result instantly — free, no signup.

Open the Calculator →

How to Convert Binary to Decimal

To convert a binary number to a human number, simply look at every "1" in the binary string and add its corresponding column value. You ignore all the "0"s.

Example 1: Convert the binary number 1011

  1. Write the column values above the binary numbers from right to left: (8) (4) (2) (1) 1 0 1 1
  2. Add the column values where there is a "1": 8 + 2 + 1 = 11 The binary number 1011 equals 11 in decimal.

Example 2: Convert an 8-bit byte 11001000

  1. Write the 8 column values: (128) (64) (32) (16) (8) (4) (2) (1) 1 1 0 0 1 0 0 0
  2. Add the values where there is a "1": 128 + 64 + 8 = 200 The binary number 11001000 equals 200 in decimal.

A useful self-check: the rightmost bit alone decides odd or even. If a binary number ends in 1, its decimal value is odd; if it ends in 0, the value is even. 1011 ends in 1, and 11 is odd — consistent.

Converting Decimal Back to Binary

The reverse trip uses repeated division by 2. Divide the number by 2, record the remainder, and continue with the quotient until it reaches zero. Then read the remainders from bottom to top.

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

Reading the remainders upward gives 11001. Verify with the column method: 16 + 8 + 0 + 0 + 1 = 25. Correct.

A second technique suits mental math: greedily subtract the largest power of two that fits. For 25, subtract 16 (write 1), leaving 9; subtract 8 (write 1), leaving 1; skip 4 and 2 (write 0, 0); subtract 1 (write 1). Same answer: 11001.

When you need speed instead of practice, our Decimal to Binary Converter runs either direction instantly.

Counting in Binary

Counting works exactly as in decimal, except you run out of digits almost immediately. After 0 and 1, you must carry: 2 is written 10, 3 is 11, and 4 carries again to 100.

This produces the sequence 0, 1, 10, 11, 100, 101, 110, 111, 1000... Notice that binary numbers grow long quickly, which is precisely why programmers lean on hexadecimal shorthand (covered below).

Try counting on your fingers with each finger as one bit, up for 1 and down for 0. One hand can represent 0 through 31; two hands reach 1,023. It is a party trick that genuinely builds intuition.

Bits and Bytes

  • A Bit is a single binary digit (a single 0 or 1).
  • A Byte is a grouping of exactly 8 bits (e.g., 11111111).
  • The maximum decimal number a single Byte can hold is 255 (128+64+32+16+8+4+2+1).

This is why old 8-bit video games like Pac-Man or The Legend of Zelda often had maximum limits of 255 for things like rupees, items, or levels. The computer literally ran out of 1s and 0s to represent the number 256!

The pattern scales predictably. Sixteen bits max out at 65,535, and 32 bits reach 4,294,967,295 — over four billion. Each added bit exactly doubles the counting range, a fact worth remembering: n bits store 2ⁿ different values.

Half a byte also has a name: a nibble of 4 bits, holding values 0 through 15. Nibbles matter because each one maps perfectly onto a single hexadecimal digit.

Storage sizes carry one historical quirk. A kilobyte was long treated as 1,024 bytes (2¹⁰) rather than 1,000, which is why modern standards introduced the kibibyte (KiB) for the 1,024 version to end the ambiguity.

Binary in Everyday Computing

Text is binary underneath. In the ASCII encoding, every character owns a number: capital A is 65, written in binary as 01000001. Every letter you type becomes a byte like this before it travels anywhere.

IP addresses are four bytes in a trench coat. The familiar 192.168.1.1 is four decimal numbers, each between 0 and 255, because each one is really an 8-bit byte dressed in decimal clothing.

Permissions and flags pack many yes/no answers into single numbers. One byte can hold eight independent on/off settings, which is why old software loved bit flags for configuration.

File sizes are bit counts in disguise. A 5 MB photo contains roughly five million bytes, or about forty million individual bits. When a download progress bar advances, it is ultimately reporting how many of those tiny two-state switches have arrived safely.

The Bridge to Hexadecimal

Binary strings get unwieldy fast, so programmers compress them with hexadecimal (base-16). Group binary digits into fours, convert each group separately, and use letters A–F for values 10 through 15.

Take the byte 10111100. Split it: 1011 = 11 = B, and 1100 = 12 = C. The byte is BC in hex, and checking in decimal: 128 + 32 + 16 + 8 + 4 = 188, while BC means 11 × 16 + 12 = 188. All three agree.

Web colors use exactly this system: #FF0000 is pure red because FF (255) is the maximum byte value. Convert your own with our Hex to Decimal Converter.

Common Mistakes to Avoid

Reading 10 as "ten." In binary, 10 means one two and zero ones: the number two. New learners stumble here constantly, because the symbols look familiar while the values are not.

Assigning column values from the left. Place values must start at 1 on the right and double leftward. Anchoring them on the left inverts every answer.

Fearing leading zeros. 00101 and 101 are the same number, five. Computers pad values to fixed widths for neatness; the zeros on the left add nothing.

Assuming the range doubles "roughly." It doubles exactly. Going from 8 bits to 9 bits moves the maximum from 255 to 511 — not a rounding error in sight.

FAQ

Can binary represent negative numbers? Yes. Programmers use a system called "Two's Complement." In a signed binary number, the very first bit on the left is used to indicate the sign (0 for positive, 1 for negative), rather than representing a value.

How does two's complement actually store -5 in a byte? Start with 5 as 00000101. Flip every bit to get 11111010, then add 1, giving 11111011. Read unsigned, that is 251 — and 251 − 256 = −5, which is exactly how the hardware interprets it.

How many values can n bits represent? Exactly 2ⁿ values, starting from zero. Eight bits give 256 values (0–255), and 64 bits give over 18 quintillion, which is why modern systems rarely run out of room for ordinary counting tasks.

Why don't computers just use decimal internally? Because hardware is built from switches with two stable states. Engineering a reliable ten-state switch for every digit would be slower, hotter, and far more error-prone than billions of simple two-state ones.


Translate massive binary strings instantly without manual calculation errors using the CalcUnit Binary Converter today.

NameUnderstanding Binary: How to Convert Base-2 to Decimal
DescriptionLearn how to read the language of computers. We explain the Base-2 binary numbering system and the mathematical algorithm to convert 1s and 0s into human numbers.
PublishedJune 12, 2026 · CalcUnit Computer Science Experts
Filed underconverters · binary to decimal

Keep Reading

Decoding Hexadecimal: Converting Base-16 to Decimal
Converters

Decoding Hexadecimal: Converting Base-16 to Decimal

Learn how to manually translate hexadecimal color codes and MAC addresses back into standard Base-10 numbers using the power-of-16 positional system.

Jun 12, 2026CalcUnit Computer Science Experts