How a Computer "Thinks" - Hardware Basics
The basic hardware of modern computers, explained for people who never wanted to study electrical engineering.
Right now, as you read this sentence, billions of tiny switches inside your device are flipping between "on" and "off." That is literally the only thing a computer can do. How does flipping switches let you watch videos, write messages, or talk to an AI?
The answer starts with three physical components you can actually hold in your hands - and a surprisingly simple alphabet of ones and zeros. By the end of this article, you will understand what happens inside your device every time you open an app, and why the same hardware now powers artificial intelligence.
The Team Inside Your Computer: CPU, RAM, and Storage
Definition
CPU, RAM, and Storage
Analogy
Definition
Where the office analogy breaks: a real desk is not 100,000 times faster to reach than a real filing cabinet. In a computer, the speed differences really are that extreme - RAM is roughly 100,000 times faster than a hard drive for random access.
RAM Access
~100 ns
Volatile but extremely fast
SSD Access
~100 µs
1,000x slower than RAM
Hard Drive Access
~10 ms
100,000x slower than RAM
- 1. The operating system reads the program data (several megabytes) from the SSD
- 2. Program and document are loaded into RAM
- 3. The CPU reads instructions from RAM and executes them
- 4. The GPU renders the window and displays text on screen
- 5. When you save, changes are written from RAM back to the SSD
Caution
Common Misconception: Storage Space vs. Working Memory
"Storage is full" can mean two different things: either the SSD is full (no more room for files) or RAM is maxed out (programs become slower). These are completely different problems with different solutions.
"More RAM = faster computer" is only partially true. More RAM prevents data from being swapped to the slower SSD. But actual computing speed depends on the CPU.
Why Does Your Computer Have Two Brains?
Besides the CPU, most computers contain a second processor: the GPU (Graphics Processing Unit). While the CPU has few but very powerful cores, a modern GPU has thousands of simpler cores that work simultaneously.
Think of the CPU as a university professor who can solve any problem - but only one at a time. The GPU is like a stadium of 10,000 school children solving simple addition problems simultaneously. For one complex integral, the professor wins. For coloring 8 million pixels per frame, the stadium wins by a landslide.
The analogy has limits: GPU cores are not "dumb" - they can execute various operations, have their own registers and caches, and are coordinated by sophisticated scheduling hardware.
Note
Why Parallelism Is Essential
A 4K display has 3,840 x 2,160 = roughly 8.3 million pixels. At 60 frames per second, that means 500 million pixel updates per second - with color, lighting, and shadows. That easily adds up to hundreds of billions to trillions of operations per second, more than a CPU can handle on top of all its other tasks.
Few powerful cores (e.g., 8). Flexible, fast context switching. Ideal for complex, sequential tasks: operating system, program logic, decisions.
Thousands of simpler cores (e.g., 10,000+). Massively parallel. Ideal for identical calculations on many data points: pixel rendering, matrix operations, AI training.
Neural networks are fundamentally built on matrix multiplications - millions of identical calculations on large number arrays. Exactly what GPUs do best.
With NVIDIA CUDA (2007), it became practical for the first time to use GPUs for general-purpose computing beyond graphics. Since 2017, NVIDIA has added specialized Tensor Cores (other manufacturers similar matrix units) that are particularly efficient for AI workloads.
Caution
Common Misconception: "GPUs Are Only for Gaming"
Graphics cards were long associated with gaming. Today, GPUs are central components in data centers for science, medicine, and especially AI development. And: more GPU memory (VRAM) does not automatically mean more frames per second - VRAM determines how much data the GPU can hold at once.
Interactive: GPU Data Explorer
Sort and filter real GPU models by VRAM, compute power (TFLOPS), power consumption, and price. Compare gaming cards with datacenter GPUs and observe why the A100 and H100 cost so much more — and why VRAM is crucial for AI models.
The Digital Alphabet: Bits, Bytes, and Binary Code
A bit (binary digit) is the smallest unit of information and can have exactly two states: 0 or 1. A byte consists of 8 bits and allows 256 different combinations. Computers use binary because transistors - their building blocks - have two reliable states: conducting (on/1) and blocking (off/0).
Morse code transmits messages with just two signal types - short and long. Similarly, the binary system encodes everything with 0s and 1s. Different combinations produce different meanings, and the "language" is determined by the interpreting system, not by the pattern itself.
The analogy breaks because Morse code is time-based: signal duration is part of the encoding. Bits, however, are position-based - each bit in a byte has a fixed positional value: 128, 64, 32, 16, 8, 4, 2, 1.
Note
Step by Step: The Letter "A" in Binary Code
- 1. "A" has the decimal value 65 in the ASCII code
- 2. Positional values of a byte: 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
- 3. Binary: 0100 0001 — only positions 64 and 1 are "on"
- 4. 64 + 1 = 65 = "A" - the same bit pattern could also mean the number 65 or a brightness value
The key insight: the pattern 01000001 has no built-in meaning. Only the program reading the bits decides whether it represents a letter, a number, or something else entirely.
One Letter
1 Byte
A single ASCII character
A Smartphone Photo
~5 MB
Millions of pixels with three color values each, stored compressed
A Smaller AI Model
~14 GB
Billions of weight values
Why bits and bytes matter for the rest of the learning path: terms like "32-bit float," "8-bit quantization," or "tokenization" build directly on this understanding. Mastering the digital alphabet helps you grasp future technical terms more quickly.
Note
Key Takeaways
- The CPU is the brain that executes instructions step by step - fast and flexible, but limited to a few tasks at a time.
- RAM is the short-term workspace: blazingly fast but volatile - everything vanishes when the power goes out.
- SSD/hard drive is the long-term archive: persistent but a thousand to a hundred thousand times slower than RAM for random access.
- The GPU contains thousands of simpler cores that work in parallel - originally for graphics, now the engine behind AI training.
- Every piece of digital data - text, images, AI models - is ultimately encoded in bits (zeros and ones), just at vastly different scales.
Check
Quiz: Hardware Basics
What happens to the contents of RAM during a power outage?
Select one answer
1. What happens to the contents of RAM during a power outage?
2. Your computer becomes slow. Task Manager shows 95% RAM usage. What is the most likely cause?
3. An AI developer wants to train a neural network with millions of matrix multiplications. Which hardware component is most important?
4. The bit pattern 01000001 is stored in memory. Can you determine its meaning without additional context?
Check
Comprehension Check
Can you explain this in your own words? Tick what you've got.
0 of 3 done