Consica Labs

Consica Labs
Chapter 5

Memory (RAM)

The computer's short-term workspace

Introduction

Imagine you are working on a big jigsaw puzzle on a large table. All the pieces you need right now are spread out on the table where you can reach them quickly. The table is your RAM — it holds what you are actively working on.

Every time you open an app, load a game, or edit a document, the computer copies the data it needs into RAM. The more RAM you have, the more you can do at once without slowing down. But unlike your puzzle pieces, everything on the table disappears the moment you turn off the lights.

Key Insight

RAM is volatile — it forgets everything when the power goes off. That is why you lose unsaved work in a power outage.

How It Works

RAM is like your desk while doing homework. You keep your pencil, eraser, and the book you are reading right now on the desk. When you finish and pack up, everything goes back into your backpack (the hard drive). The desk is fast to grab things from; the backpack is slower but keeps things safe.

Household Object Analogy

Think of RAM as a whiteboard. You write notes on it while working on a math problem. It is fast to write and read, but the moment you erase it (turn off the power), those notes are gone. A notebook (storage) keeps things permanently, but it takes longer to flip pages and write in it.

Deeper Dive

RAM stands for Random Access Memory. "Random access" means the CPU can read or write any memory location directly without going through all the previous locations — like picking any book off a shelf versus rewinding a tape to find a song.

When you launch a program, the operating system loads its instructions from the slow storage drive into RAM. The CPU then fetches these instructions from RAM, which is hundreds of times faster than reading from a hard drive. This is why adding more RAM can make a slow computer feel much faster — the system can keep more data in the fast zone.

RAM is organized into memory cells, each storing one bit (0 or 1). These cells are arranged in a grid of rows and columns. The memory controller sends a row address and a column address to locate a specific cell and read or write its value.

Types of RAM

DRAM (Dynamic RAM)

Used in most computers as main memory. Each bit is stored in a tiny capacitor that leaks charge, so it must be refreshed thousands of times per second. Slower but much cheaper and denser than SRAM.

SRAM (Static RAM)

Faster and more reliable than DRAM because it uses flip-flop circuits instead of capacitors. No refresh needed. Used for CPU cache (L1, L2, L3). Expensive and takes more space, so it is used sparingly.

Advanced

Modern RAM modules use DDR (Double Data Rate) technology, which transfers data on both the rising and falling edges of the clock signal. DDR5, the latest generation as of 2025, offers data rates up to 6400 MT/s (megatransfers per second) with lower voltage (1.1V) compared to DDR4.

The memory controller, now integrated into the CPU die (rather than the motherboard northbridge), manages the physical and electrical interface to the RAM modules. It handles row activation, column access, precharge, and refresh cycles. Timing parameters like CAS latency (CL) measure the delay between requesting data and receiving it — lower CL means faster response.

Virtual memory extends physical RAM by using a portion of the storage drive as overflow. The OS swaps data between RAM and a page file (Windows) or swap space (Linux). While this prevents crashes when RAM is full, it is dramatically slower because storage drives are orders of magnitude slower than RAM.

Vocabulary Table

Term Definition
RAMRandom Access Memory; the computer's short-term, fast workspace
DRAMDynamic RAM; main memory that needs constant electrical refresh
SRAMStatic RAM; fast cache memory using flip-flop circuits
Volatile MemoryMemory that loses data when power is turned off
Non-Volatile MemoryMemory that retains data without power (e.g., ROM, flash)
DIMMDual Inline Memory Module; the standard form factor for desktop RAM
SODIMMSmall Outline DIMM; compact RAM used in laptops
CacheSmall, ultra-fast memory inside or near the CPU for frequently used data
Virtual MemoryUsing storage drive space as overflow when RAM is full
CAS Latency (CL)The delay in clock cycles between requesting data and receiving it from RAM

Fun Facts

The first DRAM chip, the Intel 1103, was released in 1970 and held just 1 kilobit of data — about one millionth of a modern smartphone's RAM.

A typical DDR5 stick refreshes each of its billions of capacitors every 64 milliseconds — that is 15,625 times per second.

L1 cache in a modern CPU is roughly 100 times faster than main RAM. Accessing L1 takes about 1 nanosecond, while RAM takes about 100 nanoseconds.

If your computer runs out of RAM and starts using virtual memory heavily, it can slow down by 100x or more because SSDs are much slower than RAM.

The term "memory" in computers originates from the 1940s when ENIAC used vacuum tubes as storage — each tube remembered whether it was on or off.

Interactive Diagram

Launch the interactive diagram to see this in action.

Open Interactive Diagram

The interactive diagram for this chapter demonstrates RAM — Random Access Memory. It shows a visual representation of RAM as a grid of memory cells, with data being written, read, and cleared.

What to explore:

  • click to open a program; watch RAM cells fill up; close the program to see RAM clear; see the difference between RAM and storage
  • RAM is temporary, fast memory that holds data currently in use — it clears when the computer powers off

Knowledge Check

1. What does RAM stand for?

Answer: Random Access Memory

2. Which type of RAM is faster and used for CPU cache?

Answer: SRAM (Static RAM)

3. Why is RAM called "volatile" memory?

Answer: It loses data when power is turned off

4. True or False: Adding more RAM always makes a computer faster, no matter what.

Answer: False. Adding more RAM helps only if you are running out. Once you have enough, extra RAM does not improve speed.

5. True or False: The CPU can access data in RAM faster than data on an SSD.

Answer: True. RAM is hundreds of times faster than even the fastest SSDs.

6. Matching: Connect each term to its description.

1. DRAM
A. Ultra-fast memory inside the CPU
2. SRAM
B. Main memory that needs refreshing
3. Virtual Memory
C. Using storage as overflow for RAM

Answer: 1-B, 2-A, 3-C

7. Fill in the blank: The compact RAM form factor used in laptops is called ____.

Answer: SODIMM (Small Outline DIMM)

8. Fill in the blank: The delay between requesting data from RAM and receiving it is measured by ____.

Answer: CAS Latency (CL)