Understanding Computer Memory
A CPU is blindingly fast, but it has very little internal storage—its registers can only hold a few dozen numbers at once. To run actual applications, the computer needs a vast, high-speed workspace to store millions of instructions and variables. This workspace is Random Access Memory (RAM).
RAM is organized like a massive grid of numbered cubbies. Every single byte has its own unique memory address.
Volatile RAM vs Persistent Storage (SSD)
RAM is volatile: it uses tiny electrical capacitors that require power to maintain data. Turn off the computer, and RAM instantly wipes clean to 0.Storage (SSD / NVMe / HDD) is non-volatile: it uses magnetic or flash-charge traps that retain photos and files forever without power, but it is hundreds of times slower than RAM.
The Post-Office Box Analogy
Imagine a giant wall of post-office boxes: Every box has a distinct number stamped on it (0x00, 0x01, 0x02...)—this is the Address. Inside each box sits a piece of paper holding an 8-bit number—this is the Value. The mail carrier can walk directly to box #16 and read or swap the paper in nanoseconds. That is why it’s called "Random Access" (you can access any address randomly with equal speed).
Interactive RAM Address Grid
Every byte in RAM has a unique numerical address (like a house number). Click any address in the grid below to inspect, read, or write data into that specific physical location.
Address Inspector: 0x10
Role: result = 42
Store / Write Value to 0x10
The Three Types of Computer Storage
Read & Write / Volatile
Ultra-fast working memory for active programs and variables. Data vanishes when powered off. Size: typically 8 GB to 64 GB. Speed: ~50 nanoseconds.
Read-Only / Permanent
Contains factory-programmed boot instructions (UEFI/BIOS). It cannot be easily modified and persists forever. It tells the hardware how to turn on and find the SSD.
Persistent / Files
Stores the operating system, games, and documents permanently. When you launch an app, the OS copies it from SSD into RAM so the CPU can execute it.
Byte-Addressable Memory: How Multi-Byte Data Lives in RAM
Every single address in RAM points to exactly ONE byte (8 bits) of space. So what happens when a program stores larger data types?
Takes 1 Address
Example: char c = 'A' occupies address 0x10.
Takes 4 Consecutive Addresses
Example: int a = 15 spans 0x10, 0x11, 0x12, 0x13. The pointer points to 0x10.
Takes 8 Consecutive Addresses
Spans 8 consecutive bytes in 64-bit systems.
Common Beginner Misconceptions
- "The memory address and the value inside it are the same thing."
Reality: Never confuse a house number with the person living inside! Memory address0x10is just the physical/virtual location coordinate. The value stored inside0x10could be 42, 0, 255, or the letter 'A'. - "RAM addresses correspond directly to physical wires on the silicon chip."
Reality: To protect programs from hacking or crashing each other, the operating system gives every application an isolated Virtual Address Space. The CPU’s hardware MMU (Memory Management Unit) translates virtual addresses to actual physical DRAM pins via page tables on the fly. - "More RAM makes the CPU clock tick faster."
Reality: RAM capacity has zero effect on the CPU’s clock speed. However, if you run out of RAM, the OS is forced to use the SSD as slow emergency memory (called paging or swapping), which slows down execution by 1,000×!
A program requests to write the number 42 into memory address 0x10. Why is address 0x10 considered a 'Virtual Address' rather than a physical wire on the RAM chip?
Lesson 05 Key Takeaways
- RAM provides the high-speed workspace the CPU needs to run active software.
- Every byte in RAM has a unique numerical address (e.g. 0x00, 0x10).
- RAM is volatile (wipes on shutdown); SSD storage is persistent (retains files).
Notessaved locally+
Notes stay in this browser. They are not uploaded.
Suggest an editLearning graph
Discussion
Loading discussion…
Sign in to ask a question.