How Memory Works
Your computer remembers everything - but how? Explore the fascinating world of computer memory, from tiny bits to terabytes.
Your computer remembers everything - but how? Explore the fascinating world of computer memory, from tiny bits to terabytes.
At its core, all computer memory is just 1s and 0s
Binary calculation:
Not all memory is created equal - some is blazing fast, some stores everything
The CPU's personal scratchpad
Registers are tiny storage locations directly inside the CPU. They hold the data currently being processed - like the numbers in a math equation the computer is solving right now. Incredibly fast but extremely limited.
Super-fast memory right on the chip
Cache is like a small desk next to your workspace. It stores frequently-used data so the CPU doesn't have to wait for slower RAM. L1 is fastest but smallest, L3 is slowest but biggest.
Where your running programs live
RAM is like your desk - it holds everything you're currently working on. When you open an app, it loads into RAM. But when you turn off your computer, RAM forgets everything (volatile memory).
Fast permanent storage with no moving parts
SSDs use flash memory chips (like a giant USB drive). They're much faster than hard drives and survive drops better. Your files stay here even when the power is off.
Spinning platters store massive amounts
HDDs use spinning magnetic disks with a moving arm that reads/writes data - like a record player. They're slower but can store huge amounts of data cheaply. That's why servers still use them!
Memory on computers across the internet
Cloud storage is just other people's computers! Your data travels over the internet to massive data centers. Slower to access, but it's always backed up and available from any device.
Every byte in memory has its own unique address
Click on memory slots to see their addresses. Purple slots are "in use" by a program.
How much space do everyday things actually take?
Watch how data moves through the memory hierarchy
You now understand the invisible world powering every computer.
Everything in computers - text, images, videos, games - is stored as patterns of 1s and 0s. Each bit is a tiny switch that's either on or off.
Fast memory is expensive and small. Cheap memory is slow but massive. Computers use a hierarchy to balance speed and storage.
RAM forgets everything when power is off. Storage (SSD/HDD) remembers forever. That's why you need to save your work!
Every byte in memory has a unique address, like a house number on a street. The CPU uses these addresses to find and store data.
Put your new knowledge into practice!