Reading time: 15min
Computer 101: How it works.
Your brief technical guide to understanding your computers.

A computer stores and processes information. We think of computers as machines today, but the word used to mean something very different. Before electronics, a Computer was a person—someone skilled in math—who did complex calculations. Or an analog machine that worked with mechanical gears. These human computers, or mechanical gears were vital for things like figuring out the movement of stars or planning military operations. While the technology has changed drastically, the basic idea of computing is still at the heart of what a computer is.
Math is great, yes, but for most of us it gets cumbersome and tedious at times, especially when the tasks are repetitive. This increases human error, and consumes most of our time. It is in human nature to automate the mundane, and move on to the next big challenge. In this article, we will not focus much on the human computers, but we will dive into these analog and digital forms of computers that expand our skillset.
Now, I'm not going to bore you with a laundry list of computer components. Instead, let's dive deep, starting from the absolute basics – the nitty-gritty of how it all works, from quantum physics to chemistry. I'll leave the rest for your own exploration.
A Glimpse into the Past: Mechanical Computing
Believe it or not, the history of computing stretches back millennia. Long before electricity, we were tinkering with mechanical systems to solve complex problems. The Antikythera Mechanism, a sophisticated device discovered in Greece, dates back to around 100 BC. This ancient tool used to predict astronomical events, demonstrates the ingenuity of our ancestors in harnessing the power of mechanical gears.
Gears
Imagine two gears of different sizes meshed together. Let's say one gear has 10 teeth, and the other has 20 teeth. If you turn the smaller gear (10 teeth) one full rotation, the larger gear (20 teeth) will only turn half a rotation. So we would need to turn the red gear twice for the green gear to perform one full rotation. This simple gear system is performing a division operation: 20 teeth / 10 teeth = 2.
While this is a simplified illustration, it highlights the key idea: The physical relationship between the gears (their tooth ratios) encodes a mathematical relationship. By manipulating the gears, you're directly manipulating the values they represent, performing a computation. The creation of such a complex device speaks to a fundamental human desire: to understand and manipulate the world around us through computation.
This drive has persisted throughout history, leading us to ever more sophisticated calculating machines. As the years have passed, we have continued developing these machines further and further, so they become faster and smarter. Today, that quest for speed and intelligence has brought us to the electronic computer, a machine built on the fundamental principles of electron behavior.
The Rise of Electronics: The Power of the Electron
You may have heard of electrons. They are these tiny negatively charged particles that exist in regions around the nucleus (core) of an atom, an area known as electron clouds or orbitals. The nucleus contains protons and neutrons. Unlike electrons, protons are positively charged, and neutrons have no charge.
Electrons are held near the nucleus by the electromagnetic force, specifically the attraction between their negative charge and the positive charge of the protons. When the electrons absorb or gain energy they get further away from the nucleus, and when they emit or lose energy they get closer to the nucleus. These distances are known as electron orbits, or electron shells, and we will talk about that in a bit.
Everything around us is made of atoms, and how these atoms are arranged determines the state of matter. In solids, like metals, atoms are packed tightly together, restricting their movement. In liquids, atoms have more space between them, allowing freer movement. In gases, this space is even greater. This increased spacing in liquids and gases means they can be compressed more easily, explaining why they react differently to changes in temperature and pressure.
Atoms strive for balance in terms of net charge, so in their natural state, they possess an equal number of electrons and protons. Each element has its own unique type of atoms, which gives them distinct atomic weights. The atomic weight of an element is the sum of its protons and neutrons. Electrons are not included in this calculation because their mass is negligible in comparison.
On the Periodic Table, you'll find the atomic weights listed at the bottom of each element's box, with the number of protons (the atomic number) in the top left corner. To determine the number of neutrons, simply subtract the atomic number from the atomic weight. Ever wondered how scientists determined these numbers or constructed the Periodic Table? It's a fascinating topic for further exploration.
For instance, from the periodic table we can see that the Lithium element has an atomic weight of 7, and an atomic number of 3. This indicates that Lithium has 3 protons and 3 electrons because, in a neutral atom, the number of protons equal to the number of electrons. Electrons are extremely light compared to protons and neutrons, contributing almost nothing to the atomic mass. To calculate the number of neutrons, subtract the atomic number (protons) from the atomic weight: 7 (atomic weight) - 3 (protons) = 4 neutrons for a Lithium atom.
As we've seen, a lithium atom has 3 electrons, 3 protons, and, as we calculated, 4 neutrons. The electrons are located in the outer regions of the atom, constantly moving around the nucleus (the core). While it's tempting to compare this to planets orbiting the sun, electrons don't follow fixed paths like planets. Instead, their movement is more random, but their average distance from the nucleus is generally predictable. As mentioned earlier, electrons with higher energy tend to be further from the nucleus. We organize these electron regions into shells or energy levels, which are based on their average distance from the nucleus.
The outermost shell of an atom is called the valence shell, and the electrons in this shell have the highest energy. Because of this, these electrons tend to leave their atoms more easily. Atoms generally prefer to have their valence shell either completely full or completely empty, rather than having just a few electrons. As a result, the electrons in the valence shell are more mobile and can transfer between the valence shells of neighboring atoms.
In metals, atoms with a single electron in the valence shell are better conductors than those with more than one. Elements like gold, copper, and silver all have a single electron in their outer shell, making them excellent conductors. Zinc, on the other hand, has two electrons in its valence shell, so while it's still conductive, it's not as effective as copper or gold.
For example, from the periodic table, we see that a copper atom has 29 protons, which means that under natural conditions it also has 29 electrons, since atoms are neutral.
As shown in the image above, copper, like lithium, has just one electron in its valence shell, which is ideal for conductivity. However, unlike lithium, copper has many more electrons in its inner shells. While these inner electrons don't move when a current flows through the metal, they help the outer electrons move more freely by shielding the positive charge of the nucleus and reducing the pulling force from the protons, allowing the outer electrons to move more easily. This is why copper is a better conductor than lithium.
Additionally, the further an electron is from the nucleus, the more energy it has. This means that each electron in the valence shell carries more energy. The inner electrons also allow for better overlap of energy levels, which improves the metal's band structure. This reduces resistance (think of friction as in classical physics) and allows the outer electrons to move with greater ease, enhancing the conductivity of metals like copper.
Let's take a look at a copper wire cross section.
Since copper is a metal, its atoms are packed closely together. However, the electrons in the atoms' valence shells can move freely in random directions. While this movement happens naturally, it's not useful by itself because the energy stored in these electrons isn't directed. To harness this energy, we need the electrons to flow in a single direction, from one end of the wire to the other. This flow of electrons in one direction is called current. Current is the movement of electrons through a conductor, and to make this happen, we need a power source. This is where a battery comes in—it provides the push needed to direct the electrons and create a steady flow of current.
When you connect the ends of the battery to a copper wire, a path is created for the charges to finally meet. Electrons (negative charges) will flow from the negative side of the battery toward the positive side through the wire. If the wire were made of a material that doesn't conduct electricity (like glass), the electrons wouldn't be able to move, and no current would flow.
When electrons pass through an LED, they release some of their energy in the form of light (specifically, photons), which causes the LED to illuminate. In a traditional light bulb, the process is different. As electrons flow through the thin filament inside the bulb, they encounter resistance. This resistance causes the filament to heat up as the electrons collide with the atoms in the filament. When the filament gets hot enough, it emits light due to the heat. In both cases, the energy carried by the electrons is converted into light, but the mechanisms are different: LEDs emit light via photon release, while traditional bulbs emit light through heat.
How Does this Relate to Computers?
A modern computer is essentially a complex network of circuits that manipulates electric currents—and by extension, electrons. In fact, you could think of a computer as an "electron controller". Electrons are used because they possess inherent energy, they move incredibly fast, and when their flow is directed through circuits, they can perform all kinds of tasks by transferring their energy. This manipulation of electron flow enables computers to process information, perform calculations, and create the “magic” we see in modern technology.
How Do Computers Perform Calculations?
You can think of computers as collections of mathematical functions. In any function, you have inputs and outputs. For example, let's take this simple function:
Here, y is your function, and x is the input. If you input 2 as x, the function gives you:
In this case, the logic behind the function is straightforward: take whatever input you get and add 2 to it. If the input was 5, the result would be 7. Now, let's see how a computer can achieve this with electric current.
Binary and Boolean Logic
A wire in a computer circuit can only have two states: either current is flowing through it, or it isn'. For simplicity, we label the presence of current as 1 and the absence of current as 0. Since there are only two possible states, this is an example of a binary system. In algebraic terms, it's a Boolean system because it can only have two possible values: 1 or 0. Fun fact: this is why people often say computers run on ones and zeros!
Computers use this binary logic to represent and process all kinds of information, from numbers to text and more. But how do computers handle these "ones and zeros" to perform calculations like adding numbers?
The Role of Transistors
This is where transistors come in. A transistor is made from a material called a semiconductor, and it acts like a switch—just like the light switch in your house. It can either allow current to pass (representing 1) or block the current (representing 0).
A transistor is the key to controlling electrical signals in a circuit. In a computer, billions of transistors are used to build logic gates, which are the basic building blocks of digital circuits. Logic gates perform simple operations like AND, OR, and NOT, which together can perform more complex operations like addition and multiplication. By combining logic gates, we can create circuits that add numbers or perform any other computation.
Binary and Counting:
Computers use a binary counting system because electrical systems can't “count” the way humans do. In binary, each number is represented using only ones and zeros. The binary counting system, which dates back to mathematicians like Thomas Harriot and Juan Caramuel de Lobkowitz in the 1600s, looks like this:
- 0 = 0 (no current)
- 1 = 1 (current)
- 10 = 2
- 11 = 3
- 100 = 4
- 101 = 5
As you can see, just like in the decimal system, the binary system uses place values, but here each place represents a power of 2 instead of 10.
From Transistors to Circuits
Transistors are the fundamental components that allow a computer to physically represent and manipulate numbers in binary. But how do they help perform actual mathematical operations?
Transistors form logic gates, which combine to create circuits that can perform specific tasks, like adding two numbers or comparing values. A computer's Arithmetic Logic Unit (ALU), for example, is made up of these logic gates, and it's the part of the CPU responsible for performing basic arithmetic and logic operations.
From Past to Present: Vacuum Tubes and Transistors
Before transistors, early computers used vacuum tubes to control electric current. However, vacuum tubes were bulky, slow, and consumed a lot of power. The invention of the transistor in the mid-20th century revolutionized computing by making devices faster, smaller, and more efficient.
If this is all too confusing, do not worry, I know a video that would help you better visualize this.
Now that we convered the nitty gritty, let's move on to the bigger picture.
A basic computer consists of these items:
- Power Supply
- Motherboard (or Logic Board)
- Central Processing Unit (CPU)
- Graphic Processing Unit (GPU)
- Random-Access Memory (RAM)
- Storage (Hard Disk Drive or Solid State Drive)
Power Supply: The Energizer
Electricity is the lifeblood of your computer, so the power supply is like the heart, and the cables are the veins. Electric grids and power plants generate Alternating Current (AC), supplying it to homes and businesses because AC is more cost-effective to transport over long distances than Direct Current (DC). However, a computer doesn't like AC because it needs stable voltage to operate smoothly.
In AC, the voltage changes its direction (positive to negative and vice versa), making the current flow back and forth. Computers, on the other hand, need a steady flow of current in one direction—this is where the power supply unit (PSU) comes in. It converts AC into DC, which is what your computer's components need. The PSU also prevents overheating by dissipating energy in the form of heat, often using a fan to cool down.
Motherboard: The Foundation
The motherboard is the backbone of your computer. It connects all the components, distributing power and allowing communication between them. It gets its power from the power supply and sends it where it's needed, ensuring the CPU, GPU, RAM, and storage all work together seamlessly. The traces on the motherboard act as pathways for electric signals, enabling data to flow between the components.
CPU: The Brain
The CPU (Central Processing Unit) is the brain of your computer. It performs the calculations and logical operations that allow your computer to function. The CPU takes instructions from you (via software) and translates them into commands for other components. It's responsible for everything from arithmetic and logic (like comparison operations) to coordinating the tasks of other components within the system.
GPU: The Graphics Maestro
The GPU (Graphics Processing Unit) is a specialized processor designed to handle graphics-intensive tasks. While the CPU is a general-purpose processor, the GPU quickly processes, and displays images and videos, making it crucial for gaming, 3D modeling, and video editing. They are designed for parallel processing, meaning they can handle many calculations simultaneously, which is essential for rendering complex graphics.
RAM: Random Access Memory
It acts as the computer's short-term memory. It's like a temporary workspace where the CPU can quickly access and store data that it's currently working on. Think of it as the desk where you keep the documents you're actively working on – it's readily available for immediate use. However, RAM is volatile, meaning it loses its data when the power is turned off, much like notes on a whiteboard that disappear when you erase them.
Storage: HDD or SSD
The storage is your computer's long-term memory, where your operating system, applications, and data reside permanently, and is housed in either a Hard Disk Drive (HDD) or a Solid State Drive (SSD).
An HDD has spinning platters to magnetically store data, much like a record player. In contrast, an SSD, resembling a modern digital library, employs flash memory for faster, more reliable storage, just like a USB drive. Unlike HDD you do not hear any sound (no moving components), that is why it is called solid state.
The Future of Computing
The journey of computing is far from over. From the mechanical gears of the past to the cutting-edge technologies of today, we continue to push the boundaries of what's possible. Quantum computing, artificial intelligence – these are just a glimpse of what the future holds.
This blog article has merely scratched the surface. I encourage you to delve deeper, explore the intricacies of this fascinating field, and discover the wonders of the digital world.