✅ Describe the different levels of memory (registers, cache, RAM, storage).
✅ Explain the trade-off between speed, cost, and capacity.
✅ Differentiate between RAM and ROM.
✅ Explain the types of RAM (SRAM, DRAM, DDR).
✅ Describe the types of ROM (Mask ROM, PROM, EPROM, EEPROM, Flash).
Extension · if time permits
🎯 Pre-Check: What Do You Already Know?
A quick warm-up — no pressure! See what you already know.
1. Which of these stores data permanently, even without power?
2. In general, which memory type has the LARGEST capacity?
3. What does "volatile" mean in the context of memory?
What is the Memory Hierarchy?
Computers don't use just one type of memory. They use a variety, each with different strengths.
The memory hierarchy is a system that organizes these types based on performance and cost.
The Core Principle: A trade-off between Speed, Cost, and Capacity.
🎯 The Trade-Off Explorer
Click a memory level to see its Speed / Cost / Capacity trade-off profile:
The Memory Pyramid 📊
This pyramid visualizes the fundamental trade-offs in computer memory.
🔼 Top of the Pyramid
⚡ Fastest Speed
💰 Most Expensive (per byte)
🤏 Smallest Capacity
🔽 Bottom of the Pyramid
🐢 Slowest Speed
💵 Cheapest (per byte)
💾 Largest Capacity
Extension · if time permits
🎯 Memory Speed Sorter
Click memory types in order from FASTEST to SLOWEST:
1st (Fastest)?
2nd?
3rd?
4th (Slowest)?
Fastest and smallest at the top
Level 1: CPU Registers
The Absolute Fastest Memory
Location: Directly inside the CPU chip.
Function: Holds the data the CPU is actively processing at this very moment.
Capacity: Extremely small (measured in bytes).
Analogy: The single thought you are having right now.
Level 2: Cache Memory
The Speed Bridge: Connects the ultra-fast CPU with the slower RAM.
Location: On or very close to the CPU.
Function: Stores frequently accessed data and instructions from RAM to save time.
Benefit: Drastically reduces CPU waiting time, making the system feel faster.
Analogy: The notes and tools on your desk for the task you're currently working on.
Cache is on the CPU chip itself
🎯 Cache Hit or Miss? Simulator
Blue = in Cache | Grey = RAM only. CPU requests a random block each time.
In CacheRAM OnlyRequested
Hits: 0
Misses: 0
🎬 Watch: Registers and Cache as a Library
Level 3: Primary Memory (RAM)
Random Access Memory (RAM): The computer's main workspace.
Location: On the motherboard.
Function: Holds the operating system, open applications, and data currently in use.
Key Property: It is volatile.
⚡ Volatile Memory: All contents are lost when the computer is powered off!
🎬 Watch: How a DRAM Cell Holds a Bit
Level 4: Secondary Storage
Long-Term Memory: Where your files live permanently.
Function: Stores data and programs for long-term, persistent access.
Key Property: It is non-volatile.
Examples: Hard Disk Drives (HDDs), Solid-State Drives (SSDs), USB drives.
💾 Non-Volatile Memory: Retains data even when the power is off.
🔍 Volatile vs. Non-Volatile
⚡ Volatile (e.g., RAM)
Temporary storage
Requires power to hold data
Data is lost on power-off
Much faster access
💾 Non-Volatile (e.g., SSD)
Permanent storage
No power needed to hold data
Data persists after power-off
Slower access
Extension · if time permits
🎯 Volatile or Non-Volatile? Classify It!
Card 1 of 8
Loading...
Practical Application: Loading an App
Step 1 (Storage): You click an app icon. The app's files are read from your slow but large SSD.
Step 2 (RAM): The main app files are loaded into your much faster RAM, the computer's "workspace".
Step 3 (Cache): The most frequently used data is copied to the ultra-fast Cache to be ready for the CPU.
Step 4 (Registers): The exact calculation for what to display next happens inside the CPU's Registers.
Context in Nepal: Buying a Laptop
When shopping in places like Putalisadak or New Road, you'll see these specs:
RAM (Primary Memory)
Specs like "8GB RAM" or "16GB RAM".
More RAM is crucial for multitasking (e.g., running Chrome, VS Code, and other apps).
Storage (Secondary)
Specs like "512GB SSD" or "1TB HDD".
An SSD makes your computer boot up and load programs much faster than an HDD.
Local Tip: For most students in Nepal, a laptop with at least 8GB RAM and a 256GB+ SSD offers the best balance of performance and price.
Extension · if time permits
🎯 Nepal Laptop Advisor
Select specs to see if a laptop from Putalisadak suits your needs:
Extension · if time permits
🎯 Memory Hierarchy: Final Quiz
1. Which memory type is located directly inside the CPU and is the fastest?
2. What happens to data stored in RAM when the computer is powered off?
3. A student in Kathmandu wants the fastest boot speed on a budget laptop. Which storage should they prioritise?
4. Cache memory acts as a speed bridge between which two components?
Primary Memory: Two Families
Primary memory is the working memory the CPU can access directly.
⚡ RAM
Volatile: loses its contents when power is off.
Read and write. Holds the programs and data in use right now.
🔒 ROM
Non-volatile: keeps its contents without power.
Mostly read. Holds firmware and start-up instructions.
Volatile vs Non-Volatile: Sort It!
Click each memory type to assign it to the correct category.
VOLATILE
NON-VOLATILE
RAM: Characteristics
Volatile: data is lost when the power is turned off
Read-write: data can be read and changed
Random access: any location can be reached directly
Fast and temporary: used for active programs and data
More RAM lets you run more programs at once and work with larger files.
Two Kinds of RAM: SRAM and DRAM
Static RAM (SRAM)
Uses flip-flop circuits (6 transistors per bit). No refresh needed.
Very fast, expensive, low density.
Used for CPU cache.
Dynamic RAM (DRAM)
Uses 1 transistor and 1 capacitor per bit. The capacitor leaks, so it is refreshed thousands of times per second.
Cheaper, denser, slower than SRAM.
Used for main memory.
🎬 Watch: Why SRAM Is Faster
Six transistors for one bit
Extension · if time permits
SRAM vs DRAM: Which is Which?
Click a property card. Select SRAM or DRAM, then reveal the answer.
Score: 0 / 0
DDR SDRAM Generations
Modern DRAM transfers data twice per clock cycle (Double Data Rate).
Generation
Transfer rate
Voltage
Year
DDR
200–400 MT/s
2.5 V
2000
DDR2
400–800 MT/s
1.8 V
2003
DDR3
800–1600 MT/s
1.5 V
2007
DDR4
1600–3200 MT/s
1.2 V
2014
DDR5
3200–6400+ MT/s
1.1 V
2020
Each generation is faster, uses less power, and holds more per module.
DDR5: desktop DIMM vs laptop SO-DIMM
ROM: Characteristics and Types
ROM keeps its data without power and stores permanent start-up instructions.
Type
How it is written or erased
Typical use
Mask ROM
Written at the factory; cannot change
Mass-produced devices
PROM
Programmed once by burning fuses
Custom firmware
EPROM
Erased with UV light through a quartz window
Development and prototyping
EEPROM
Erased electrically, byte by byte
BIOS chips, settings
Flash
Erased electrically in blocks
SSDs, USB drives, phones
ST M27C160
Extension · if time permits
ROM Types: Name That Memory!
Read the description, then click the matching ROM type to reveal if you are correct.
Loading...
RAM vs ROM
Feature
RAM
ROM
Volatility
Volatile
Non-volatile
Operation
Read and write
Mostly read
Speed
Faster
Slower
Capacity
Larger
Smaller
Purpose
Active programs and data
Firmware and boot code
Without power
Data lost
Data kept
RAM vs ROM: Attribute Challenge
Each row shows an attribute. Click the correct winner — RAM or ROM.
Attribute
RAM
ROM
Score: 0 / 0
Memory in a Modern Computer
BIOS/UEFI: boot firmware in Flash ROM
CPU cache (L1, L2, L3): SRAM
System RAM: DDR4 or DDR5 DRAM
Storage: SSDs built on Flash memory
Boot sequence: power on → BIOS/UEFI runs from ROM → POST checks the hardware → bootloader and operating system load into RAM → applications run from RAM.
🎬 Watch: What Happens at Power-On
Boot Process: Order the Memory Steps!
Click the steps in the correct order from power-on to OS ready.
Your sequence (click to add):
Buying Tip: How Much RAM?
8 GB is a sensible minimum for office work and study.
16 GB is better for heavy multitasking, design, or programming.
Check whether RAM is soldered (no upgrades later) or in a slot.
Check the type: DDR4 and DDR5 modules are not interchangeable.
Key Takeaways
The memory hierarchy is a pyramid built on a trade-off: Speed vs. Cost vs. Capacity.
The levels, from fastest to slowest, are: Registers > Cache > RAM > Secondary Storage.
Cache memory is a small, fast buffer that bridges the speed gap between the CPU and RAM.
RAM is volatile (temporary workspace, loses data without power), while ROM and Secondary Storage are non-volatile (permanent; ROM holds firmware).
SRAM is faster and more expensive than DRAM, so it is used for cache; each DDR generation improves speed and efficiency.
Flash memory, a type of EEPROM, is the basis of SSDs and USB drives.
🤔 Discussion Question
Let's Think...
Why don't we just build computers with a very large amount of the fastest type of memory (registers)?
Hint: Think about the trade-offs in the pyramid (Speed, Cost, Capacity).
Exam Practice: Short Answer
What is the memory hierarchy?
Differentiate between RAM and ROM.
Differentiate between SRAM and DRAM.
What is flash memory? Where is it used?
Exam Practice: Long Answer
Explain the memory hierarchy with a diagram, describing each level.
Explain the types of primary memory and their uses.
Explain the types of RAM and ROM.
Describe the role of RAM and ROM in the boot process of a computer.