Electronics

Memory (RAM)

When someone says "this machine has 16 GB of RAM," this is what they mean — the fast, working memory a CPU actively reads and writes while a program runs. It's a completely different thing from storage, in one way that matters more than any speed or capacity number: what happens when the power goes off.

Quick reference
What it is
Fast, volatile working memory the CPU actively uses while running — cleared entirely on power loss.
Mental model
A desk you're actively working at — everything within arm's reach for as long as you're there, but cleared the moment you leave the room.
Key numbers
Measured in GB; current generations are DDR4/DDR5. Volatile: content is gone the instant power is lost.
Reach for it when
Describing how much active data/how many running programs a system can hold at once — not how much it can permanently keep.

Volatile — the defining property

RAM's single defining trait is that it's volatile: every bit it holds vanishes the instant power is removed. That's the direct, deliberate contrast with ROM and storage — this page is fast because it doesn't have to guarantee anything survives past the next power cycle, a guarantee non-volatile memory has to work much harder (and slower) to provide.

DRAM vs. SRAM

DRAM
What "RAM" almost always means in practice — a capacitor per bit that leaks charge and must be constantly refreshed thousands of times a second. Cheap and dense, which is why it's used for a system's main memory, measured in GB.
SRAM
Built from transistor latches instead of capacitors — no refresh needed, meaningfully faster, but far more expensive and less dense per chip area. Used for CPU cache and for a microcontroller's own small internal RAM, where every extra nanosecond of latency and every microwatt of power actually matters.

Why more RAM helps

When active data no longer fits in RAM, the operating system starts swapping — temporarily writing some of it out to much slower storage to make room, then reading it back when needed again. This is the actual mechanism behind "why is my computer crawling with 50 browser tabs open" — not the CPU struggling, but RAM running out and the system falling back to a component hundreds of times slower to compensate.

Where memory sits in the hierarchy

CPU registers and cache are faster and smaller than RAM; storage is far larger and far slower. RAM is the middle tier — big enough to hold an entire running program's active data, fast enough that the CPU isn't constantly stalled waiting on it, but not fast enough to skip cache, and not persistent enough to skip storage.

Real-world applications

Gotchas

Field notes