COA Notes
Types of RAM (SRAM, DRAM) and ROM (PROM, EPROM, EEPROM, Flash) with technology comparison.
Introduction
All computer memory falls into two broad categories: RAM (Random Access Memory), which loses its contents when power is off, and ROM (Read-Only Memory), which retains data without power. These fundamental technologies serve different purposes — RAM provides the fast, writable workspace for active computation, while ROM stores permanent programs and data that must survive power cycles. Understanding both is essential for system design.
RAM (Random Access Memory)
"Random access" means any location can be accessed in the same amount of time, regardless of its address (unlike sequential access in tape).
SRAM (Static RAM)
Technology: Uses 6 transistors per bit (flip-flop circuit — two cross-coupled inverters)
Characteristics:
- Very fast (0.5-5 ns access time)
- No refresh needed (static — holds data as long as power is on)
- Low density (6 transistors per bit = large cell)
- Expensive (per bit)
- Low power (no refresh)
Use: Cache memory (L1, L2, L3), register files, small fast memories
DRAM (Dynamic RAM)
Technology: Uses 1 transistor + 1 capacitor per bit
Characteristics:
- Moderate speed (50-100 ns random access, ~10 ns within open row)
- Requires periodic refresh (capacitor leaks — must be read and rewritten every ~64 ms)
- High density (1 transistor per bit = small cell)
- Cheap (per bit)
- Higher power (refresh circuits constantly active)
Use: Main memory (the RAM sticks in your computer)
SRAM vs DRAM Comparison
| Feature | SRAM | DRAM |
|---|---|---|
| Cell size | 6 transistors | 1 transistor + 1 capacitor |
| Speed | ~1-5 ns | ~50-100 ns |
| Density | Low (large cells) | High (tiny cells) |
| Cost per bit | ~10× more expensive | Cheap |
| Refresh | Not needed | Required every ~64 ms |
| Power (idle) | Low | Moderate (refresh) |
| Typical use | Cache | Main memory |
| Capacity | KB to tens of MB | GB to TB |
ROM (Read-Only Memory)
ROM retains data without power (non-volatile). Despite the name "read-only," many modern ROM variants can be reprogrammed.
Mask ROM
- Data permanently written during manufacturing (mask pattern)
- Cannot be modified after production
- Cheapest for large volumes (one-time mask cost)
- Used for: mass-produced firmware where content never changes
PROM (Programmable ROM)
- Manufactured blank, programmed once by the user
- Uses fusible links — "blown" fuses represent 0s
- Once programmed, cannot be changed
- Used for: prototyping, small production runs
EPROM (Erasable PROM)
- Can be erased by exposing to UV light (through quartz window on chip)
- Erased completely (all bits at once), then reprogrammed
- Erase takes 15-20 minutes under UV lamp
- Distinctive: ceramic package with clear quartz window
- Used for: development and testing (rare today)
EEPROM (Electrically Erasable PROM)
- Erased and reprogrammed electrically (no UV needed)
- Can erase individual bytes (byte-level granularity)
- Limited write cycles (~100,000-1,000,000)
- Slower writes than reads
- Used for: small settings storage, BIOS parameters
Flash Memory
- Evolution of EEPROM with block-level erase (not byte-level)
- Much higher density than EEPROM
- Very high write endurance (100,000+ program/erase cycles for SLC)
- Fast reads, moderate writes
- Two types: NOR flash (random access, code execution) and NAND flash (sequential, data storage)
NAND Flash: Used in SSDs, USB drives, SD cards, smartphone storage NOR Flash: Used in firmware storage (BIOS/UEFI chips), embedded systems
ROM Technology Summary
| Type | Writable? | Erase Method | Granularity | Cycles |
|---|---|---|---|---|
| Mask ROM | No (factory only) | N/A | N/A | 0 |
| PROM | Once | N/A (permanent) | N/A | 1 |
| EPROM | Yes | UV light | Entire chip | ~1,000 |
| EEPROM | Yes | Electrical | Byte-level | ~100K |
| Flash (NOR) | Yes | Electrical | Block-level | ~100K |
| Flash (NAND) | Yes | Electrical | Block-level | ~100K-1M |
Applications
| Memory Type | Application |
|---|---|
| SRAM | CPU cache (L1/L2/L3) |
| DRAM | Main memory (RAM DIMMs) |
| Mask ROM | High-volume consumer electronics firmware |
| EEPROM | BIOS settings, smart cards |
| NOR Flash | Firmware storage, microcontroller code memory |
| NAND Flash | SSDs, USB drives, smartphone storage |
Key Takeaways
- RAM (volatile): SRAM for speed (cache), DRAM for density (main memory)
- ROM (non-volatile): Stores permanent data/firmware that survives power off
- SRAM uses flip-flops (fast, expensive); DRAM uses capacitors (dense, cheap, needs refresh)
- ROM has evolved from truly read-only (mask ROM) to reprogrammable (Flash)
- Flash memory dominates modern non-volatile storage (SSDs, phones, embedded systems)
- The choice between SRAM and DRAM is always a speed vs density/cost trade-off
- Understanding these technologies explains why the memory hierarchy exists
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for RAM and ROM.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Computer Organization & Architecture topic.
Search Terms
computer-organization, computer organization & architecture, computer, organization, memory, ram, and, rom
Related Computer Organization & Architecture Topics