Learning Objectives
By the end of this chapter, you will be able to:
- Differentiate volatile versus non-volatile memory.
- Explain RAM types: SRAM, DRAM, and DDR generations.
- Describe ROM types: PROM, EPROM, EEPROM, and Flash.
- Choose RAM and ROM for a business task using a framework.
Primary Memory Overview
Primary memory is the memory the CPU can access directly. Two families share the board with different jobs.
- RAM (Random Access Memory): volatile, read and write. The working desk.
- ROM (Read Only Memory): non-volatile, mainly read. The starter and keeper.
flowchart TB
PM["Primary Memory"] --> RAM["RAM<br/>(Volatile, Read-Write)"]
PM --> ROM["ROM<br/>(Non-Volatile, Read)"]
RAM --> SRAM["SRAM: Cache"]
RAM --> DRAM["DRAM: Main memory DDR4 DDR5"]
ROM --> Flash["Flash and EEPROM: BIOS SSD USB"]
RAM: the working desk
RAM holds what the CPU is using now: OS, apps, open files. It is random access. Any location is reachable quickly. It is volatile. Power off, contents gone. That volatility is why unsaved work disappears.
Two physics, two roles
Do not treat SRAM and DRAM as just two names. They are two physics with opposite economics.
| Feature | SRAM (Static) | DRAM (Dynamic) |
|---|---|---|
| Cell | 6 transistors, stable flip flop | 1 transistor plus 1 capacitor |
| Refresh | None, holds while powered | Must refresh thousands of times per second |
| Speed | Very fast | Fast but slower than SRAM |
| Cost per bit | High | Low |
| Density | Low, larger per bit | High, many more bits per chip |
| Power | Lower when idle | Higher due to refresh |
| Use | Cache L1 L2 L3 | Main system memory |
The cell explains the use. A six transistor cell is bulky and costly, so it stays small and close as cache. A one transistor one capacitor cell leaks, needs refresh, but is dense and cheap, so it fills the GBs of main memory.
DDR generations: the same idea, faster and cooler
Modern DRAM is DDR SDRAM, which moves data twice per clock tick.
| Generation | Transfer rate | Voltage | In market |
|---|---|---|---|
| DDR | 200 to 400 MT/s | 2.5 V | 2000 |
| DDR2 | 400 to 800 MT/s | 1.8 V | 2003 |
| DDR3 | 800 to 1600 MT/s | 1.5 V | 2007 |
| DDR4 | 1600 to 3200 MT/s | 1.2 V | 2014 |
| DDR5 | 3200 to 6400+ MT/s | 1.1 V | 2020 |
Each generation raises bandwidth, lowers voltage, and raises capacity per module. A DDR4 stick cannot go in a DDR5 slot. The notch differs by design. Check the board before you buy.
How much RAM
More RAM means more work stays warm without paging to slow disk.
- 8 GB: minimum for office, browser, and Tally.
- 16 GB: comfortable for heavy multitasking, design, and coding.
- 32 GB and above: branch server or data work.
Soldered RAM cannot be upgraded later. Slotted RAM can. For a lab or office that must last five years, slotted DDR4 or DDR5 with an empty slot is the cheaper long term buy.
Self-check
ROM: the starter and keeper
ROM keeps its bits without power. It stores what the machine must remember before RAM is ready: firmware and boot code.
From fixed to flexible
| Type | Write | Erase | Use and note |
|---|---|---|---|
| Mask ROM | At factory only | Never | Millions of identical devices, cheapest at scale |
| PROM | Once by user with programmer | Never, fuse is burnt | Small runs needing one time custom code |
| EPROM | By programmer | UV light through quartz window, 15 to 20 minutes, whole chip | Lab and prototyping era |
| EEPROM | Electrically, byte by byte | Electrical | BIOS chips and config storage, in circuit |
| Flash | Electrically, block by block | Electrical | USB drives, SD cards, SSDs, modern BIOS |
Flash is the practical child of EEPROM. It erases in blocks, writes fast, and scales. That is why your pen drive, phone, and SSD share one root technology.
RAM versus ROM in one view
| Feature | RAM | ROM |
|---|---|---|
| Keeps without power | No | Yes |
| Operation | Read and write freely | Mainly read, written rarely or at factory |
| Volatility | Volatile | Non-volatile |
| Speed | Faster | Slower |
| Cost per bit | Higher | Lower for mask types |
| Purpose | Active programs and data | Firmware and boot code |
How they work together at boot
- Power on. ROM and Flash provide BIOS or UEFI. POST checks hardware.
- Bootloader copied from SSD into RAM.
- Operating system loaded into RAM.
- Apps run from RAM, paging to storage only if RAM is full.
- SRAM cache keeps the hottest instructions close so the CPU rarely waits for DRAM.
If step 1 were volatile, a power cut would erase how to start.
Nepal worked example: a lab that chose the right board (NPR, BS 2081)
A private college in Butwal refreshes 30 lab PCs on 2081-08-12. Two quotes arrive.
- Quote X: 30 laptops with 8 GB soldered DDR4, no empty slot, 256 GB SSD. NPR 62,000 each. Total NPR 1,860,000.
- Quote Y: 30 desktops with 8 GB DDR4 in one slot plus one empty slot, DDR4 board with two slots, 512 GB NVMe. NPR 64,500 each. Total NPR 1,935,000.
The extra NPR 75,000 for Y buys two options: add 8 GB later for NPR 4,200 per PC without replacing machines, and swap to DDR4 stock that the market still sells. Quote X saves today but forces full replacement when 8 GB becomes tight for Chrome plus VS Code plus Docker in BS 2083.
The college picks Y for half the lab where programming runs, and X only for the front office where word processing dominates. SRAM versus DRAM did not decide the purchase. Slotted versus soldered did. The ROM Flash BIOS in both lets IT update firmware over the network without touching hardware.
Example 1: In a cooperative, ROM and non-volatile Flash are audit infrastructure. Ask: on 2081-08-15 can we still boot and verify signatures if RAM is cleared? If only volatile holds the check, verification fails when power fails. Keeper layers must hold trust.
Example 2: In a operation, DRAM capacity and DDR generation are throughput infrastructure. Ask: can five tills keep the stock file warm in RAM during the 6 p.m. rush without paging? If DRAM is short, bills slow even though SRAM cache is fine.
Summary
- Main memory is two families: volatile working RAM and non-volatile starter ROM.
- SRAM is fast, bulky, and costly. It fits as cache. DRAM is dense and needs refresh. It fits as main memory.
- DDR generations raise speed and cut voltage. Slots are not interchangeable across generations.
- PROM to Flash traces the path from fixed at factory to electrically rewritable blocks that power your SSD.
Key Takeaways
- Volatility decides what survives a power cut.
- Transistor count decides cost per bit and thus placement.
- Check soldered versus slotted before you sign.
- Flash is the bridge between ROM heritage and modern storage.
Discussion Questions
- Why does SRAM suit cache while DRAM suits main memory despite SRAM being faster?
- What changes between DDR4 and DDR5 besides speed?
- Where would you use EEPROM versus Flash, and why?
Exercises
Short answer
- Differentiate volatile and non-volatile with two examples each.
- Differentiate SRAM and DRAM on cell, refresh, cost, and typical use.
- What is Flash and how does it differ from EPROM?
Long answer
- Explain RAM types and ROM types with a diagram, using Hot Warm Cold to place each.
- A lab on 2081-08-12 must choose soldered 8 GB laptops versus slotted 8 GB desktops for a five year life. Advise with NPR 4,200 upgrade math and DDR slot facts.


