0
1
1
0
1
0
0
1

How Memory Works

Your computer remembers everything - but how? Explore the fascinating world of computer memory, from tiny bits to terabytes.

1

Everything is Binary

At its core, all computer memory is just 1s and 0s

Binary calculation:

Fun fact: A single bit (0 or 1) is the smallest unit of data. 8 bits make a byte - enough to store one letter, number, or symbol!
2

The Memory Hierarchy

Not all memory is created equal - some is blazing fast, some stores everything

CPU Registers

The CPU's personal scratchpad

0.25 ns
~1 KB

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.

🏃

CPU Cache (L1/L2/L3)

Super-fast memory right on the chip

1-10 ns
4-64 MB

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.

🧠

RAM (Main Memory)

Where your running programs live

50-100 ns
8-64 GB

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).

💾

SSD (Solid State Drive)

Fast permanent storage with no moving parts

25-100 µs
256 GB - 4 TB

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.

📀

HDD (Hard Disk Drive)

Spinning platters store massive amounts

5-10 ms
1-20 TB

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!

☁️

Cloud Storage

Memory on computers across the internet

10-200 ms
Unlimited

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.

Speed Comparison (relative to registers)

Registers
1x
L1 Cache
4x slower
L3 Cache
40x slower
RAM
400x slower
SSD
100,000x slower
HDD
40,000,000x slower
3

Memory Addresses

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.

Decimal Address
Click a slot
Hexadecimal Address
0x--
Binary Address
--------
Stored Value
--
Fun fact: A 64-bit computer can address up to 18.4 quintillion bytes (18,446,744,073,709,551,616) - that's 18 billion gigabytes!
4

What Fits in Memory?

How much space do everyday things actually take?

📝

Text Message

~200 bytes
Plain text is incredibly small
📄

Word Document

~50 KB
A typical essay or report
🎵

MP3 Song

~4 MB
3-4 minute song at 320kbps
📷

Phone Photo

~4 MB
12 megapixel JPEG image
🎬

1 Min HD Video

~150 MB
1080p recorded on phone
🎮

Modern Video Game

50-150 GB
AAA titles with high-res textures
🌐

Web Page

~2-5 MB
Average website with images
🎥

4K Movie

~20-50 GB
2-hour film, high quality
Perspective: All the text in every book ever written would fit in about 50 terabytes. That's just 25 modern hard drives!
5

Data Flow in Action

Watch how data moves through the memory hierarchy

💾
Storage
SSD/HDD
🧠
RAM
Main Memory
🏃
Cache
L1/L2/L3
CPU
Processing
Click "Play Animation" to see how data flows when opening an application!

Memory Master!

You now understand the invisible world powering every computer.

0
Binary Conversions
0
Memory Levels Explored
0
Time Exploring

Binary Foundation

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.

Speed vs. Size Tradeoff

Fast memory is expensive and small. Cheap memory is slow but massive. Computers use a hierarchy to balance speed and storage.

Volatile vs. Permanent

RAM forgets everything when power is off. Storage (SSD/HDD) remembers forever. That's why you need to save your work!

Everything Has an Address

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.

Ready to Create?

Put your new knowledge into practice!

Suggest a Correction