Explain the differences between Random Access Memory (RAM) and Read Only Memory (ROM)

Published by Patrick Mutisya · 8 days ago

Cambridge A-Level Computer Science 9618 – 3.1 Computers and Their Components

3.1 Computers and Their Components

Objective: Explain the differences between Random Access Memory (RAM) and Read‑Only Memory (ROM)

Both RAM and ROM are types of primary memory that reside on the computer’s motherboard, but they serve very different purposes and have distinct characteristics.

1. Definitions

  • Random Access Memory (RAM): A volatile memory that stores data and programs that are currently being used by the CPU. Its contents are lost when power is removed.
  • Read‑Only Memory (ROM): A non‑volatile memory that contains permanent instructions or data that cannot be easily altered. Its contents remain after power is switched off.

2. Key Characteristics

CharacteristicRAMROM
VolatilityVolatile – loses data when power is cutNon‑volatile – retains data without power
Typical UseTemporary storage for active programs and dataPermanent storage for firmware and boot instructions
Read/Write CapabilityRead and write (both operations are fast)Primarily read; write only during manufacturing or special updates
SpeedVery fast (nanosecond access times)Slower than RAM, but still fast compared with secondary storage
Typical CapacityGigabytes (GB) in modern PCsKilobytes to a few megabytes (e.g., BIOS firmware)
ExamplesDDR4, DDR5 modulesBIOS/UEFI chip, PROM, EPROM, EEPROM

3. Types of RAM

  1. Dynamic RAM (DRAM): Stores each bit in a separate capacitor; requires periodic refreshing.
  2. Static RAM (SRAM): Uses flip‑flops to store bits; faster and does not need refreshing, but is more expensive.

4. Types of ROM

  1. Mask ROM: Data is written during the manufacturing process; cannot be altered.
  2. Programmable ROM (PROM): Can be programmed once after manufacture.
  3. Erasable Programmable ROM (EPROM): Can be erased with U \cdot light and re‑programmed.
  4. Electrically Erasable Programmable ROM (EEPROM): Can be erased and re‑programmed electrically, often used for firmware updates.

5. Functional Roles in a Computer System

When a computer is powered on, the CPU first reads the boot instructions from ROM (often called the BIOS or UEFI). These instructions perform hardware checks and then load the operating system into RAM. Once the OS is in RAM, the CPU can access it and any running applications at high speed.

6. Comparative Summary

The table below summarises the main differences using a concise bullet format.

  • RAM is temporary and read/write; ROM is permanent and mainly read‑only.
  • RAM is volatile; ROM is non‑volatile.
  • RAM provides the workspace for active processes; ROM stores the fundamental code that starts the computer.
  • Typical capacities differ by orders of magnitude (GB vs. KB/MB).

7. Example Scenario

Consider loading a word processor:

  1. The OS, stored on the hard drive, is copied into RAM.
  2. The word processor executable is also loaded into RAM.
  3. While you type, the document resides in RAM for fast access.
  4. When you save, the data is written back to secondary storage.
  5. The BIOS code that initiated this process remains in ROM throughout.

8. Quick Check Questions

  1. What happens to the contents of RAM when the computer is switched off?
  2. Why is ROM essential for the boot process?
  3. Give two examples of non‑volatile memory that are not ROM.

Suggested diagram: A block diagram showing the CPU connected to both RAM and ROM, with arrows indicating data flow during boot and normal operation.