## glossary
What is Hardware?
Hardware is the set of physical, tangible components of a computing system — everything you can actually touch. It is the counterpart of software, the instructions that run on top of that hardware.
The relationship between the two is one of mutual dependence: hardware without software is an inert pile of circuits, and software without hardware is just text. Every line of code you write eventually becomes electrical signals in transistors.
The main components
- CPU (processor) — executes the instructions. Its relevant characteristics are cores, threads, clock frequency and cache memory.
- RAM — fast, volatile storage for data in use. Turn the machine off and everything is gone.
- Storage — persistent. NVMe SSDs are orders of magnitude faster than mechanical hard drives, and swapping to one is the upgrade that most transforms perceived speed.
- GPU (graphics card) — thousands of simple cores for parallel computation. Essential for games, rendering and training AI models.
- Motherboard — connects everything together and determines which components are compatible with each other.
- Power supply — converts and distributes power; the most neglected component and a common cause of instability.
The memory hierarchy
A concept that explains a large share of performance decisions in software. The closer to the processor, the faster and the more expensive per byte — and the smaller the capacity:
CPU registers ~1 cycle
L1 cache ~4 cycles
L2 cache ~12 cycles
L3 cache ~40 cycles
RAM ~200 cycles
NVMe SSD ~100,000 cycles
mechanical HDD ~10,000,000 cycles
# This is why contiguous data structures
# (arrays) tend to outperform scattered ones
# (linked lists) even at the same complexity.CPU and GPU: two different kinds of parallelism
The CPU has a few very fast, sophisticated cores, optimized for complex sequential tasks. The GPU has thousands of simple cores, optimized for applying the same operation to huge volumes of data at once. That difference is precisely why the GPU became the central hardware of artificial intelligence: training a neural network is, in essence, multiplying gigantic matrices. We go deeper in how GPUs shaped the AI era.
Why this matters if you write code
Understanding hardware changes coding decisions. Knowing that RAM access is hundreds of times slower than cache explains why the order in which you traverse a matrix changes performance. Knowing that disk operations are extremely expensive justifies caching. And sizing servers requires understanding where the real bottleneck is — CPU, memory, disk or network. For choosing equipment, see how to choose the best laptop and gaming PCs and high performance.
## faq
Frequently asked questions
What is the difference between hardware and software?
Hardware is the physical part — components you can touch. Software is the instructions and data that run on that hardware. There is also firmware, software recorded into the component itself, which sits halfway between the two.
Does more RAM always make a computer faster?
Only up to the point where memory stops being the bottleneck. If the system is using the disk as virtual memory because it ran out of RAM, adding more brings a huge gain. If there is already memory to spare, the money goes much further on a faster SSD or a better processor.
Do I need a GPU to work with AI?
To use models through an API, no — the processing happens on the provider’s servers. To train models or run them locally, a GPU with a good amount of dedicated memory makes a radical difference; on a CPU, the same training run can take days instead of hours.
## read next