DEV Community

Cover image for The Day I Realized Computer Science Is Just Controlled Electricity
MD Fakhruddin
MD Fakhruddin

Posted on

The Day I Realized Computer Science Is Just Controlled Electricity

My "Wait... What?" Moment

I was sitting in a computer architecture class, and once again, the professor said, “Computers only understand 0s and 1s.” Everyone nodded like they’d heard it a hundred times. But something about that line finally made me stop and think.

What do these 0s and 1s actually mean?

  • As someone with an electrical engineering diploma, something finally clicked that day...

  • That moment changed how I saw everything — from programming languages to processors.

The Problem Everyone Ignores

  • CS professors say "computers understand binary" but never explain what that ACTUALLY means

  • Students learn about 0s and 1s as abstract numbers. The physical reality gets completely lost in abstraction

  • I spent months learning algorithms without knowing I was choreographing electricity

My Journey: From Circuits to Code

When I was studying for my diploma in Electrical Engineering, I clearly saw how electrical energy worked in real life.

For example, when we powered a motor, the field winding used the electricity to create a magnetic force that rotated the rotor. It was simple and tangible — I could see how electricity played its role in making machines work. I also understood how various appliances used electrical energy to perform specific tasks.

But when I shifted to Computer Science, everything felt abstract.

I was a complete beginner. I didn’t even know how to write a simple program. All I kept hearing was, “Computers only understand 0 and 1.” But I was confused. We still give electricity as input to a computer — just like a motor or a fan. So why doesn’t anyone talk about that?

I kept wondering:
What do those 0s and 1s actually represent?
Why does no one ever explain what’s physically happening?

I spent months in this confusion. Then one day, it finally clicked.
To execute any task, a computer just controls the flow of electricity.

  • If electricity flows → we represent it as 1

  • If it doesn’t → it’s 0
    That was it.
    Such a simple idea — but it took me a long time to realize.

And strangely, no one had ever said it — not in class, not in books, not anywhere. Once I understood this, so many things became clearer. I realized that programming, at its core, is just managing the dance of electrons — directing where and when electricity should flow

The Lightning Bolt Moment

Before this realization, I used to think Electrical Engineering and Computer Science were completely separate domains. But that one simple insight changed everything. I began to see how processors, storage devices, and circuits are all working together—just by controlling the flow of electricity.

The General Misunderstanding

If you walk into a computer science classroom and ask, "How does a computer work?", most students will confidently reply:

“It works on binary—0s and 1s.”

But if you follow up with, "What do 0 and 1 actually mean?" — many fall silent.
We repeat this phrase so often that we rarely question what’s beneath it.

Even professors often say, “Computers only understand 0 and 1,” but they don’t usually explain that these are just human labels for the presence or absence of electric current.

It’s such a simple truth — and yet, it’s almost never spoken.

If a professor simply said, “At its core, a computer controls the flow of electricity to execute tasks,” it would clear up so much confusion.
Students don’t need to study full electrical engineering to understand this — but they should know where computation truly begins.

From Electrons to Execution: What Happens Inside a Computer?

Transistors: The Basic Switches
Every computer chip is made of billions of tiny switches called transistors.

  • When electricity flows: it's treated as 1
  • When electricity is blocked: it's treated as

Logic Gates: Combining Switches
Transistors are connected in patterns to create logic gates like AND OR NOT.
These gates form the basic decision-making units in hardware.

CPU Instructions: Built from Logic
With enough gates, we can build more complex components like adders, comparators, and memory units.
These form the Arithmetic Logic Unit (ALU) and Control Unit inside the CPU.

Code to Voltage
When you run code (like x = 5 + 3), it gets compiled into machine instructions.
These instructions are just patterns of 0s and 1s — which control how electricity flows through logic gates.

Memory: Storage via Charge
RAM stores data using tiny capacitors — they hold or don’t hold charge to represent bits.
Even your files, apps, and photos are ultimately just stored patterns of electrical states.

Note for Readers
If any part of this section felt complex or you'd like a deeper, beginner-friendly explanation — feel free to leave a comment. I’d be happy to create a follow-up post on that specific topic. Let’s learn together.

Why This Perspective Matters

Understanding the physical side of computation helps you:

  • Debug better (you’re not just "stuck" — you may be facing hardware timing issues).

  • Think like a system designer, not just a coder.

Final Thought: You’re Not Just Writing Code — You’re Moving Electrons

For most of my academic journey, I thought electrical and computer science were worlds apart.

But now I realize: every if, while, or print() in your code is just a clever way of telling billions of transistors when to let electricity flow. That’s all — and it’s also everything.

The next time someone says, “computers only understand 0 and 1,” ask:
"What do those really mean?"

Because when you start seeing your code as electricity choreography,
you don't just become a better programmer —
you become an engineer who understands the machine

Let’s Talk

Have you ever had a moment like this?
Did your understanding of how computers really work change how you think about programming?
Drop your thoughts, questions, or even disagreements in the comments — I’d love to hear your take.

Top comments (0)