Skip to main content
Be Bitwise

RAM and ROM

Memory Fundamentals · Memory & Systems track

3 min read

In this module

The Two Pillars of Memory

RAM and ROM are the two foundational kinds of memory in every computer, and they do very different jobs. RAM is where the data your programmes are actively chewing on lives. ROM keeps the permanent instructions responsible for getting the machine going in the first place.

RAM: Random Access Memory

RAM is the computer's working memory. Fast, volatile, with the CPU free to read and write at will. Two main flavours show up in real systems:

TypeFull NameSpeedCostUse Case
SRAMStatic RAMVery fastExpensiveCPU cache
DRAMDynamic RAMFastCheaperMain memory (the "RAM" in your specs)

SRAM stores data in flip-flop circuits, typically six transistors per bit. No refresh required and it's extremely fast, but it sprawls across silicon and costs more per bit, which is why it gets reserved for small, speed-critical jobs like CPU cache.

DRAM uses one capacitor and one transistor per bit, so it's much denser and far cheaper. The price is constant refresh — capacitors leak, so every row has to be topped up every few tens of milliseconds (64 ms on classic DDR), which works out at thousands of refresh commands a second across the chip. When someone says their PC has "16 GB of RAM", they mean DRAM.

Key Concept

SRAM is fast and expensive, used for CPU caches. DRAM is slower but dense and cheap, used for main memory. Both are volatile - they lose data without power.

ROM: Read-Only Memory

ROM holds permanent instructions that don't change during normal use. Its main job is storing the firmware, the very first code that runs the moment you press the power button. On modern PCs that's UEFI (the successor to BIOS), which wakes up the hardware and hunts down the operating system on disk. In practice that firmware lives in a small SPI flash chip on the motherboard rather than true mask ROM.

Originally ROM really was read-only, programmed once at the factory and that was it. Modern systems use variants like EEPROM and flash memory that can be rewritten, but the role hasn't changed: persistent storage for boot-time code that must outlive a power cut.

Why Both Exist

RAM on its own can't start a computer — it's empty after every power cycle. ROM on its own can't run programmes — it's too slow and was never built for constant read-write traffic. They work as a tag team. ROM boots the machine, loads the OS into RAM, and from there RAM takes over as the high-speed workspace for everything else.

Here's that hand-off on a typical PC:

The first instructions the CPU ever runs have to come from the chip that kept its contents through the power cut. Everything after that step is about getting code off the disk and into RAM, where it can run at full speed.