Counting in Binary- A Beginner's Guide
What the Heck Is Binary, Anyway?
Binary is a number system that uses only two digits: 0 and 1. That's it. No 2s, no 3s, no 9s. Just off and on, true and false, yes and no.
Your computer runs on binary. Every pixel on your screen, every letter you type, every video you watch — it's all just streams of 0s and 1s being flipped on and off billions of times per second.
Humans count in decimal (base-10). We have 10 digits: 0 through 9. Binary is base-2. Two digits. That's the whole difference.
Why Do Computers Even Use Binary?
Hardware is simpler when it only has to track two states. An electrical signal is either on (1) or off (0). No ambiguity. No fuzzy math.
Think about it: trying to build a computer that understands 10 different voltage levels would be a nightmare. Noise, interference, manufacturing imperfections — everything would break. But detecting "is there a signal or not?" is dead simple.
Each 0 or 1 is called a bit. Eight bits make a byte. That's where terms like kilobyte, megabyte, gigabyte come from — they're all built on powers of 2.
How Binary Counting Actually Works
In decimal, each place value is 10 times bigger than the one to its right. You have ones, tens, hundreds, thousands, and so on.
Binary does the same thing, but each place value is 2 times bigger than the one to its right. Here's the pattern:
- Rightmost digit: ones place (2⁰ = 1)
- Next digit to the left: twos place (2¹ = 2)
- Next: fours place (2² = 4)
- Next: eights place (2³ = 8)
- Next: sixteens place (2⁴ = 16)
- Next: thirty-twos place (2⁵ = 32)
See the pattern? Each step left doubles the value. Keep going: 64, 128, 256, 512, 1024...
Reading a Binary Number
Let's decode 11010:
| Digit | 1 | 1 | 0 | 1 | 0 |
|---|---|---|---|---|---|
| Place Value | 16 | 8 | 4 | 2 | 1 |
| Multiply | 1×16 | 1×8 | 0×4 | 1×2 | 0×1 |
| Result | 16 | 8 | 0 | 2 | 0 |
Add them up: 16 + 8 + 0 + 2 + 0 = 26
So 11010 in binary equals 26 in decimal. That's all there is to it.
Converting Decimal to Binary
The method: keep dividing by 2, write down the remainders, then read them backwards.
Let's convert 42 to binary:
- 42 ÷ 2 = 21, remainder 0
- 21 ÷ 2 = 10, remainder 1
- 10 ÷ 2 = 5, remainder 0
- 5 ÷ 2 = 2, remainder 1
- 2 ÷ 2 = 1, remainder 0
- 1 ÷ 2 = 0, remainder 1
Read the remainders from bottom to top: 101010
Check: 32 + 0 + 8 + 0 + 2 + 0 = 42 ✓
Binary to Decimal — The Quick Method
Forget the math. Here's the fast way to read binary:
- Start from the right, write 1, 2, 4, 8, 16, 32... (doubling each time)
- Cross out the places under the 0s
- Add up the remaining numbers
For 10011011:
| Binary | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 1 |
|---|---|---|---|---|---|---|---|---|
| Place Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Include? | ✓ | ✗ | ✗ | ✓ | ✓ | ✗ | ✓ | ✓ |
128 + 16 + 8 + 2 + 1 = 155
Common Binary Numbers Worth Memorizing
| Binary | Decimal | Notes |
|---|---|---|
| 0000 | 0 | Nothing |
| 0001 | 1 | One |
| 0010 | 2 | Two |
| 0100 | 4 | Four |
| 1000 | 8 | Eight |
| 1111 | 15 | Highest 4-bit number |
| 11111111 | 255 | Highest 8-bit number |
Notice: 255 is the maximum value for one byte. That's why IP addresses and color values (RGB goes 0-255 per channel) use that range.
Getting Started: Practice Problems
Try converting these on your own before checking:
- Binary 0110 = ? (hint: 6)
- Binary 10101 = ? (hint: 21)
- Decimal 13 = ? in binary (hint: 1101)
- Decimal 100 = ? in binary (hint: 1100100)
Once you can do those without thinking, you've got the basics down.
Where You'll Actually See Binary
- IPv6 addresses — those 128-bit addresses are written in hex, but underneath it's all binary
- Color codes — #FF0000 is 255 red, 0 green, 0 blue in binary
- File sizes — 1 KB is 1024 bytes, not 1000, because computers use powers of 2
- Unicode/UTF-8 — every character is mapped to a number, stored as binary
You don't need to manually convert these things. But understanding binary makes debugging and low-level work way less confusing.
The Bottom Line
Binary is dead simple once you internalize the place values. It's just doubling: 1, 2, 4, 8, 16, 32, 64, 128, 256...
Every 1 tells you to add that place value. Every 0 means skip it. That's the whole system.
Stop overcomplicating it. Write out the place values, mark the 1s, add them up. Do it three times and it'll click.