Course Content
Part 1: What Does the CPU Really Do?
What Is a CPU and Why Is It So Important? The Difference Between RAM, Storage, and the CPU What Happens When You Click a Button on Your Computer?
0/4
Part 5: How the CPU Talks to Memory and Storage
This part will explain how the CPU and memory are like two people trying to talk across a busy room — and why the CPU needs clever helpers like RAM and cache instead of going straight to the hard drive.
0/4
Part 6: Paths and Highways: How CPUs Talk to Everything
So far, we’ve learned how the CPU works with RAM, cache, and storage. But the CPU doesn’t live alone — it has to talk to memory, graphics cards, USB sticks, and more.
0/4
How Computers Think: Inside the CPU

🧠 Wait… Can a Switch Add 2 + 2?

A switch can turn something ON.
Another switch can turn it OFF.

But can a switch add?

Surprisingly… YES!

And here’s the secret:
A computer doesn’t “know” what 2 + 2 is.
It just follows a pattern of rules.

It uses switches to make decisions.

Let’s see how.


🧩 First: Let’s Start with 1 + 1

In your world:
1 + 1 = 2

In computer world:
1 = ON
1 = ON

Now here’s the surprise…

In binary, 1 + 1 = 10

That doesn’t mean ten.

It means:

  • First switch = OFF (0)

  • Next switch = ON (1)

It’s like saying, “Oops, too big! Let’s turn this one OFF and move to the next one.”

That’s called a carry — and it’s super important.


⚙️ The Machine That Adds: A Tiny Logic Trick

Imagine you build a tiny machine with two switches:

  • A

  • B

Now you connect them to a lightbulb.

You make the bulb light up only if one of the switches is ON.

  • A is ON, B is OFF → light ON

  • A is OFF, B is ON → light ON

  • Both OFF → light OFF

  • Both ON → light OFF (weird, right?)

That’s called an XOR rule. It’s a switch rule that means:

“Only light up if exactly ONE is ON.”

Now add another switch called the carry.

That’s just a rule that says:

“If BOTH are ON, turn ON the carry light.”

So now you have:

  • Sum light = XOR

  • Carry light = AND

Boom! That’s called a half-adder.

It’s how a computer adds.


🧠 Add Big Numbers? Just Stack Them!

If one tiny adder can add 1 + 1…

You can connect them to add big numbers:

  • 1 + 2 = 3

  • 3 + 4 = 7

  • 15 + 15 = 30

You do that by chaining adders and passing the carry forward.

Each “column” of switches adds two numbers and passes on the carry if needed.

This is what happens inside your calculator or phone — millions of times per second.


📊 Let’s Add 2 + 3

2 = 010
3 = 011
Add:

    010
+  011
 ——-
    101

 

What’s 101?

Let’s decode:

  • Right = 1

  • Middle = 0

  • Left = 4

4 + 0 + 1 = 5

So 2 + 3 = 5. Even in computer world.

0% Complete