Learning Objectives

By the end of this chapter, you will be able to:

  • Differentiate between RAM and ROM.
  • Explain the types of RAM (SRAM, DRAM, DDR).
  • Describe the types of ROM (PROM, EPROM, EEPROM, Flash).
  • Understand the difference between volatile and non-volatile memory.

Primary Memory Overview

Primary memory is the computer’s main working memory that the CPU can access directly. It is divided into two main categories:

  1. RAM (Random Access Memory): Volatile, read-write memory
  2. ROM (Read Only Memory): Non-volatile, primarily read memory

RAM (Random Access Memory)

RAM is the primary working memory of a computer. It stores data and programs that are currently in use by the CPU.

Characteristics of RAM

  • Volatile: Data is lost when power is turned off
  • Read-Write: Data can be both read and written
  • Random Access: Any memory location can be accessed directly
  • Fast: Quick read and write operations
  • Temporary: Used for active programs and data

Types of RAM

1. SRAM (Static RAM)

Static RAM uses flip-flop circuits to store each bit of data. It does not need to be refreshed periodically.

Characteristic SRAM
Speed Very fast
Cost Expensive
Power Lower consumption
Density Lower (larger chips)
Use Case CPU cache memory

How SRAM Works: Uses 6 transistors per bit to hold data in a stable state as long as power is supplied.

2. DRAM (Dynamic RAM)

Dynamic RAM uses capacitors to store each bit. It requires constant refreshing (thousands of times per second) to maintain data.

Characteristic DRAM
Speed Fast (but slower than SRAM)
Cost Less expensive
Power Higher consumption (needs refresh)
Density Higher (smaller chips)
Use Case Main system memory

How DRAM Works: Uses 1 transistor and 1 capacitor per bit. The capacitor leaks charge, so it must be constantly refreshed.

3. DDR SDRAM (Double Data Rate Synchronous DRAM)

Modern computers use DDR SDRAM, which transfers data twice per clock cycle (on both rising and falling edges).

Generation Transfer Rate Voltage Year
DDR 200-400 MT/s 2.5V 2000
DDR2 400-800 MT/s 1.8V 2003
DDR3 800-1600 MT/s 1.5V 2007
DDR4 1600-3200 MT/s 1.2V 2014
DDR5 3200-6400+ MT/s 1.1V 2020

Each new generation offers:

  • Higher speeds
  • Lower power consumption
  • Increased capacity per module

RAM Capacity

RAM capacity is measured in:

  • Megabytes (MB): Older systems
  • Gigabytes (GB): Current standard (8GB-64GB typical)

More RAM allows:

  • Running more programs simultaneously
  • Working with larger files
  • Better multitasking performance

ROM (Read Only Memory)

ROM is non-volatile memory that retains its data even when power is off. It is used to store permanent instructions that the computer needs to start up.

Characteristics of ROM

  • Non-volatile: Data retained without power
  • Primarily read-only: Data written once or rarely
  • Permanent: Stores firmware and boot instructions
  • Reliable: Data not lost during power failures

Types of ROM

1. Mask ROM

The original ROM type where data is permanently written during manufacturing. Cannot be modified.

  • Use: Mass-produced devices with fixed programs
  • Cost: Economical for large quantities
  • Flexibility: None—data is permanent

2. PROM (Programmable ROM)

Can be programmed once after manufacturing using a special device called a PROM programmer.

  • Use: Custom firmware, small production runs
  • Programming: One-time only (OTP - One Time Programmable)
  • Method: Burning fuses to create 0s and 1s

3. EPROM (Erasable Programmable ROM)

Can be erased and reprogrammed. Erasing requires exposure to ultraviolet (UV) light through a quartz window on the chip.

  • Use: Development and prototyping
  • Erasure: UV light exposure (15-20 minutes)
  • Identifying feature: Transparent quartz window on chip

4. EEPROM (Electrically Erasable Programmable ROM)

Can be erased and reprogrammed electrically, without UV light. Individual bytes can be erased.

  • Use: BIOS chips, configuration storage
  • Erasure: Electrical signals
  • Advantage: Can be reprogrammed in-circuit

5. Flash Memory

A type of EEPROM that can be erased and reprogrammed in blocks. The foundation of modern storage devices.

  • Use: USB drives, SSDs, memory cards, smartphones
  • Erasure: Block-level electrical erasure
  • Speed: Faster than traditional EEPROM

Comparison: RAM vs ROM

Feature RAM ROM
Full Name Random Access Memory Read Only Memory
Volatility Volatile Non-volatile
Operation Read and Write Primarily Read
Speed Faster Slower
Cost More expensive Less expensive
Capacity Larger Smaller
Purpose Active programs/data Firmware/boot code
Data Retention Lost without power Retained without power

Comparison: SRAM vs DRAM

Feature SRAM DRAM
Speed Faster Slower
Cost per bit Higher Lower
Density Lower Higher
Refresh needed No Yes
Power consumption Lower Higher
Transistors per bit 6 1
Typical use Cache Main memory

Memory in Modern Computers

A typical modern computer uses multiple types of memory:

  1. BIOS/UEFI ROM: Stores boot firmware (Flash ROM)
  2. CPU Cache: L1, L2, L3 cache (SRAM)
  3. System RAM: Main memory (DDR4/DDR5 DRAM)
  4. Storage: SSDs (Flash memory)

The Boot Process and Memory

  1. Power on → BIOS/UEFI (ROM) loads
  2. POST (Power-On Self Test) runs
  3. Bootloader loaded into RAM
  4. Operating system loaded into RAM
  5. Applications run from RAM

Summary

Understanding the different types of memory is essential for:

  • Choosing the right computer specifications
  • Troubleshooting memory-related issues
  • Understanding system performance
  • Making informed upgrade decisions

Key Takeaways

  • RAM is volatile and used for active programs; ROM is non-volatile and used for permanent firmware
  • SRAM is faster but more expensive than DRAM
  • DDR generations continue to improve speed and efficiency
  • Flash memory (a type of EEPROM) is the basis for modern SSDs and USB drives
  • Different memory types work together in a hierarchy for optimal performance