Skip to content

Computer Memory

  • Definition: Memory is the storage space in a computer where data and instructions are stored for processing and future use.
  • Memory is broadly classified into Primary Memory and Secondary Memory.

1. Primary Memory (Main Memory)

  • Definition:
    The memory directly accessible by the CPU.
  • It stores data and instructions that are currently being executed.
  • Volatile in nature (contents lost when power is switched off).

Types of Primary Memory

  1. RAM (Random Access Memory):
    • Temporary storage for data and instructions.
    • Volatile (data lost after shutdown).
    • Types:
      • SRAM (Static RAM): Faster, expensive, used in cache.
      • DRAM (Dynamic RAM): Cheaper, slower, used in main memory.
  2. ROM (Read Only Memory):
    • Non-volatile (data remains even after power off).
    • Stores permanent instructions (like BIOS).
    • Types:
      • PROM (Programmable ROM)
      • EPROM (Erasable Programmable ROM)
      • EEPROM (Electrically Erasable Programmable ROM)
  3. Cache Memory:
    • High-speed memory between CPU and RAM.
    • Stores frequently used instructions for faster access.
  4. Registers:
    • Very small storage inside CPU.
    • Holds instructions, addresses, or data temporarily.

2. Secondary Memory (Auxiliary Storage)

  • Definition:
    Permanent memory used to store data and programs not currently in use.
  • Non-volatile (data is retained even after power off).
  • Slower than primary memory but has large capacity.

Examples of Secondary Memory

  1. Magnetic Storage Devices:
    • Hard Disk Drives (HDD)
    • Floppy Disks (obsolete)
    • Magnetic Tapes
  2. Optical Storage Devices:
    • CDs, DVDs, Blu-ray Discs
  3. Flash/SSD Storage:
    • Pen drives, Solid State Drives (SSD), Memory Cards
  4. Cloud Storage (Modern):
    • Google Drive, Dropbox, OneDrive

Comparison: Primary vs Secondary Memory

FeaturePrimary MemorySecondary Memory
SpeedVery fast (nanoseconds access time)Slower (milliseconds access time)
VolatilityMostly volatile (RAM)Non-volatile
CostExpensiveCheaper
CapacityLimited (GBs)Very large (TBs or more)
ExamplesRAM, ROM, Cache, RegistersHDD, SSD, CDs, Pen drives, Cloud
AccessibilityDirectly accessed by CPUNeeds to be loaded into primary memory before use

Summary for Exams

  • Primary Memory = Fast, small, volatile (RAM, ROM, Cache, Registers).
  • Secondary Memory = Large, permanent, slower (HDD, SSD, CDs, Cloud).