Base 2 Binary- Complete Beginner's Guide
What the Hell Is Binary?
Binary is a number system with only two digits: 0 and 1. That's it. Nothing fancy. You already know the decimal system—the one humans use every day. It has ten digits (0-9). Binary just cuts that in half. Two digits instead of ten. Computers use binary because hardware is dumb. A switch is either on (1) or off (0). Billions of switches flipping on and off. That's all your photos, videos, and this article amounts to.How Binary Numbers Actually Work
In decimal, each position represents a power of 10:- 1 = 10⁰
- 10 = 10¹
- 100 = 10²
- 1,000 = 10³
- 1 = 2⁰ = 1
- 10 = 2¹ = 2
- 100 = 2² = 4
- 1000 = 2³ = 8
- 10000 = 2⁴ = 16
- 100000 = 2⁵ = 32
Reading Binary: A Real Example
Take the binary number 10110. Read it right to left.| Binary Digit | Place Value | Calculation | Decimal Value |
|---|---|---|---|
| 1 (rightmost) | 2⁰ | 1 × 1 | 1 |
| 1 | 2¹ | 1 × 2 | 2 |
| 0 | 2² | 0 × 4 | 0 |
| 1 | 2³ | 1 × 8 | 8 |
| 1 (leftmost) | 2⁴ | 1 × 16 | 16 |
Converting Decimal to Binary
There's a simple division method:- Divide the decimal number by 2
- Write down the remainder (0 or 1)
- Divide the quotient by 2
- Repeat until the quotient is 0
- Read the remainders bottom to top
Example: Convert 45 to Binary
45 ÷ 2 = 22 remainder 122 ÷ 2 = 11 remainder 0
11 ÷ 2 = 5 remainder 1
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Read bottom to top: 101101 Check: 32 + 8 + 4 + 1 = 45 ✅
Binary Addition (The Short Version)
You only need four rules:| Input | Result |
|---|---|
| 0 + 0 | 0 |
| 0 + 1 | 1 |
| 1 + 0 | 1 |
| 1 + 1 | 0 (carry 1) |
101
+ 011
-----
1000
Working right to left:
- Column 1: 1 + 1 = 0, carry 1
- Column 2: 0 + 1 + carry 1 = 0, carry 1
- Column 3: 1 + 0 + carry 1 = 0, carry 1
- Column 4: carry 1 drops to the result
Bits and Bytes: What You Actually Need to Know
- Bit = a single binary digit (0 or 1)
- Byte = 8 bits
- A byte can represent values from 0 to 255 (2⁸ - 1)
Common Binary Numbers Worth Memorizing
| Binary | Decimal | Power of 2 |
|---|---|---|
| 1 | 1 | 2⁰ |
| 10 | 2 | 2¹ |
| 100 | 4 | 2² |
| 1000 | 8 | 2³ |
| 10000 | 16 | 2⁴ |
| 100000 | 32 | 2⁵ |
| 1000000 | 64 | 2⁶ |
| 10000000 | 128 | 2⁷ |
| 11111111 | 255 | 2⁸ - 1 |
Getting Started: Your First Exercises
Practice converting these without a calculator:- Convert 63 to binary
- Convert 11001 to decimal
- Add 1100 + 1011
How to Check Your Work
Use Windows Calculator in programmer mode, or Google "binary to decimal converter." Don't waste time doing this by hand in production code—understand the concept, then let tools handle the grunt work.Where Binary Shows Up in Real Life
You encounter binary whether you realize it or not:- IPv6 addresses — those long hex strings are just binary in disguise
- RGB color codes — #FF0000 is a byte for red (255,0,0)
- Unicode/UTF-8 — every character has a binary code point
- Permissions in Linux — chmod 755 uses octal (binary in groups of three)
Answers to Exercises
- 63 = 111111 (64 - 1)
- 11001 = 25 (16 + 8 + 1)
- 1100 + 1011 = 10111 (12 + 11 = 23)