Ever wondered what your computer actually “speaks”?
It’s not Python, Java, or English, it’s Binary.
Everything, from your favorite Netflix show to your router’s blinking lights, boils down to just two tiny symbols: 0 and 1.
🧠 Why Binary Exists in the First Place
Woah, “why” binary? Because it’s literally how computers think.
Binary is what runs this world. Every click, tap, and ping travels as a long string of 0’s and 1’s. In networking, binary is everywhere, down to the last RJ45 connector. IP addresses, subnet masks, ACLs, all secretly speak binary behind the scenes.
When you see a 0
, it means OFF.
When you see a 1
, it means ON.
That’s it. Two states. Yet those two simple numbers make everything work.
⚙️ Number of States: How Many Patterns Can Binary Make?
Let’s take two binary digits: X X
.
If you try all combinations of 0s and 1s, you get:
0 0
0 1
1 0
1 1
That’s 4 possible states.
The rule is simple:
States = 2ⁿ
(where n = number of bits)
So, 3 bits give you 8 states. 4 bits give you 16. And so on.
🔢 Counting in Binary: The Secret Behind IP Addresses
Each octet in an IP address (like 192.168.1.72
) has 8 bits, that’s why it’s called an octet.
Each position represents a power of two, starting from the right:
Binary: 1 1 1 1 1 1 1 1
Base: 2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰
Decimal: 128 64 32 16 8 4 2 1
If all are ON (1), you get 255
.
That’s why the highest value in an IP octet is 255.
💻 Decimal to Binary (a.k.a. “Divide Till You Drop”)
Here’s the trick: keep dividing by 2 and note the remainders, that’s your binary, read from bottom to top.
Example: 192 → Binary
2 | 192 | 0
2 | 096 | 0
2 | 048 | 0
2 | 024 | 0
2 | 012 | 0
2 | 006 | 0
2 | 003 | 1
1
Read upward: 1100 0000
🌐 IP Example: 192.168.1.72 in Binary
Let’s translate this:
192 = 1100 0000
168 = 1010 1000
1 = 0000 0001
72 = 0100 1000
Final binary IP:
1100 0000.1010 1000.0000 0001.0100 1000
Now you can literally see the network.
🔄 Binary to Decimal: Reverse Engineering the Magic
It’s simple: multiply each bit by its power of 2 and add them all up.
Example:
0000 1010
= 8 + 2 = 10
1000 0001
= 128 + 1 = 129
⚡ Why It All Matters
Binary might look like gibberish, but it’s the foundation of everything digital.
Every ping you send, every byte you transfer, every IP you configure, it’s all binary behind the scenes.
So next time you type an IP address or plug in an Ethernet cable, just remember:
You’re talking in the world’s simplest yet most powerful language, Binary.
Top comments (0)