🌐 What is Binary?
Think of it like a light switch:
Binary is a number system that only uses TWO digits: 0 and 1. It's how computers think!
💡 0 = Light is OFF
💡 1 = Light is ON
Computers use billions of tiny switches (transistors) that can only be ON or OFF. That's why they use binary!
We use decimal (base 10): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Computers use binary (base 2): 0, 1
🔢 How Binary Numbers Work
In decimal (what we use every day):
Each position represents a power of 10:
Example: 1234 = (1×1000) + (2×100) + (3×10) + (4×1)
In binary (what computers use):
Each position represents a power of 2:
Example: Binary 10110010 = (1×128) + (0×64) + (1×32) + (1×16) + (0×8) + (0×4) + (1×2) + (0×1) = 178
🎯 Converting Decimal to Binary (Simple Method)
The Division Method (easiest for students!):
- Divide 192 by 2 = 96 remainder 0
- Divide 96 by 2 = 48 remainder 0
- Divide 48 by 2 = 24 remainder 0
- Divide 24 by 2 = 12 remainder 0
- Divide 12 by 2 = 6 remainder 0
- Divide 6 by 2 = 3 remainder 0
- Divide 3 by 2 = 1 remainder 1
- Divide 1 by 2 = 0 remainder 1
Read remainders from BOTTOM to TOP: 11000000
The Subtraction Method (used in our tool):
- Is 192 ≥ 128? YES → Write 1, subtract: 192-128 = 64
- Is 64 ≥ 64? YES → Write 1, subtract: 64-64 = 0
- Is 0 ≥ 32? NO → Write 0
- Is 0 ≥ 16? NO → Write 0
- Is 0 ≥ 8? NO → Write 0
- Is 0 ≥ 4? NO → Write 0
- Is 0 ≥ 2? NO → Write 0
- Is 0 ≥ 1? NO → Write 0
Result: 11000000
🔄 Converting Binary to Decimal
The Addition Method:
Write the position values:
Add them up: 128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192
💡 Why IP Addresses Use Binary
Computers don't understand decimal numbers!
When you type an IP address like 192.168.1.10, your computer immediately converts it to binary:
11000000.10101000.00000001.00001010
An IPv4 address is exactly 32 bits long (four octets of 8 bits each).
8 + 8 + 8 + 8 = 32 bits total
This allows for 2³² = 4,294,967,296 possible IP addresses!
In networking:
- Routers work with binary addresses
- Subnet masks are easier to understand in binary
- Network calculations use binary AND operations
- Understanding binary helps you understand subnetting!
📊 Quick Binary Reference Table
❓ Common Questions
Why do we need to learn binary?
Understanding binary helps you:
- Understand how subnet masks work
- Calculate network addresses quickly
- Troubleshoot network problems
- Pass networking certification exams!
What's the largest number in 8 bits?
The largest 8-bit binary number is 11111111, which equals 255 in decimal. That's why each octet of an IP address can only be 0-255!
How do I remember the position values?
Easy! Start with 1 and keep doubling:
1, 2, 4, 8, 16, 32, 64, 128
Or backwards: 128, 64, 32, 16, 8, 4, 2, 1
Is there an easier way to convert?
Yes! Use this tool! 😊 But learning the manual method helps you understand WHY the conversion works, which is super important for networking!