How Do Computers Work?

From single bit to become fully functioned computer explained clearly

Dec 09, 2024

How Do Computers Work?

How do computers work? Have you ever wondered how a machine can perform complex tasks, like solving equations, streaming videos, or editing photos? What’s inside a computer that makes all this possible?

First, we need to understand what makes computers different from other devices. Unlike radios or televisions, which are designed for specific, unchanging tasks, computers are flexible and programmable. A radio is built solely to play audio, as defined by its creator, but a computer can be programmed to perform an infinite variety of tasks. This flexibility is what sets computers apart.

By understanding its core function, we can ask more specific question: How do they can be programmed to process informations?

How Computer See the World

To process information, a computer first needs to understand how to perceive information —things like your name, age, skin color, or even a photograph.

Bits

Imagine two friends who want to communicate at night but are forbidden by their parents. No phones, no telegrams, no television. Then, they come up with an idea: they use a light bulb. They make an agreement—if the light bulb is ON, it means they’re awake; if it’s OFF, it means they’re asleep.

That’s simple enough. But to share more complex information, like letters of the alphabet, they need more than one bulb. With four bulbs, they create a new set of agreements to represent different combinations:

  • ON, OFF, OFF, OFF = A
  • OFF, ON, OFF, OFF = B
  • ON, ON, OFF, OFF = C
  • OFF, OFF, ON, OFF = D

…and so on.

Using simple calculations, we know that 4 bulbs can represent 2^4 = 16 pieces of information. Adding more bulbs increases the number of possible combinations exponentially.

This is exactly how computers perceive information. Computers see the world through bits, like tiny light bulbs that can be in one of two states: ON or OFF. For more complex information, they use more bits. Modern computers can store data up to 64 bits, which means they can represent 2^{64}, or about 18 quintillion (18 followed by sixteen zeros), pieces of information. This is more than enough to represent number, text, and file.

Logic Gates

Okay, now we have a bit, a static piece of information. But how does a computer process it? For example, how does a computer calculate 1+2=31 + 2 = 3, or convert lowercase text into uppercase?

Introducing Logic Gates. Logic gates are electrical circuits inside a computer with specific configurations designed to control the flow of electrical current. Whatever enters these gates is processed and transformed into new information based on their design.

Imagine a gate like this:

Basic Computer