Computer Memory

Published on July 9, 2025 by @mritxperts

βœ… For CBSE | βœ… Competitive Exams | βœ… Computer Science Fundamentals


πŸ”° What is Computer Memory?

Computer memory is the storage space where data, instructions, and information are stored temporarily or permanently. It is essential for processing, storing files, running applications, and even starting the system.


Types of Memory in Computers

Computer memory is classified into:

Computer Memory
β”œβ”€β”€ Primary Memory
β”‚   β”œβ”€β”€ RAM (Volatile)
β”‚   β”‚   β”œβ”€β”€ DRAM
β”‚   β”‚   └── SRAM
β”‚   └── ROM (Non-Volatile)
β”‚       β”œβ”€β”€ PROM
β”‚       β”œβ”€β”€ EPROM
β”‚       └── EEPROM
β”œβ”€β”€ Secondary Memory
β”‚   β”œβ”€β”€ HDD
β”‚   β”œβ”€β”€ SSD
β”‚   β”œβ”€β”€ Optical Discs
β”‚   └── Flash Drives
└── Cache Memory & Registers

1️⃣ Primary Memory (Main Memory)

This memory is directly accessible by the CPU and is used to store data currently in use.

➀ A. RAM (Random Access Memory)

  • Volatile β†’ Data is lost when power is off.
  • Temporary storage for running programs and OS.

πŸ”Ή Types of RAM:

TypeDescriptionSpeedCost
DRAMDynamic RAM – needs refreshingMediumLow
SRAMStatic RAM – no refreshing neededHighHigh

πŸ“ Note: DRAM is used in most computers for main memory, while SRAM is used for cache memory.


➀ B. ROM (Read-Only Memory)

  • Non-volatile β†’ Retains data after shutdown.
  • Contains firmware (e.g., BIOS).

πŸ”Ή Types of ROM:

TypeDescription
PROMProgrammable once by the user
EPROMCan be erased with UV light and reprogrammed
EEPROMCan be erased electronically

πŸ“ Note: EEPROM is used in modern BIOS chips.


2️⃣ Secondary Memory (Storage Devices)

Used for long-term, permanent data storage. It is non-volatile and not directly accessible by the CPU.

πŸ”Ή Hard Disk Drive (HDD)

  • Magnetic storage
  • Large capacity (500 GB – 10 TB)
  • Slower due to mechanical parts

πŸ”Ή Solid State Drive (SSD)

  • Flash memory, no moving parts
  • Faster, more reliable
  • More expensive than HDD

πŸ”Ή Optical Discs

  • Use laser technology for reading/writing
  • Types:
    • CD (700 MB)
    • DVD (4.7 GB)
    • Blu-ray (25–128 GB)

πŸ”Ή Flash Drives (Pen drives)

  • USB-based portable storage
  • Uses EEPROM
  • Used for quick file transfer

3️⃣ Cache Memory

Cache memory is a high-speed memory located close to the CPU. It stores frequently used data/instructions to reduce access time.

LevelLocationSpeedSize
L1Inside CPUFastest32KB – 512KB
L2Near CPUVery Fast256KB – 2MB
L3Shared CacheFast4MB – 16MB

πŸ“ Note: Cache memory increases the CPU’s performance significantly.


4️⃣ CPU Registers

  • Very small, very fast memory inside the CPU.
  • Holds data and instructions currently being processed.
  • Types: Accumulator, Instruction Register, Program Counter, etc.

5️⃣ Virtual Memory

When the RAM is full, the operating system uses a part of the hard disk as Virtual RAM.

  • Slower than real RAM
  • Prevents system crashes due to memory overflow

6️⃣ Buffer vs Cache

FeatureBufferCache
PurposeManage data between devicesStore frequent data for quick access
Used inPrinters, video playbackCPU, disk access

πŸ”„ Volatile vs Non-Volatile Memory

FeatureVolatile MemoryNon-Volatile Memory
Power DependencyLoses data when offRetains data
SpeedFasterSlower
ExamplesRAM, Cache, RegistersROM, SSD, HDD, Flash Drive

πŸ“Š Comparison Table

Memory TypeVolatileSpeedCostSizeCommon Use
RegistersYesFastestVery HighBytesCPU processing
CacheYesVery FastHighKB to MBReduce memory access delay
RAMYesFastMediumGBRun applications
ROMNoMediumLowMBBooting, firmware
HDDNoSlowLowTBPermanent storage
SSDNoFastHighGB to TBOS, software storage
Flash DriveNoMediumMediumGBPortable storage

πŸ“š Real-World Application Examples

ActivityMemory Used
Booting the computerROM (BIOS)
Running apps like ChromeRAM
Storing moviesHDD/SSD
Storing OS permanentlySSD/HDD
Data transfer via USBFlash Drive
Fast data for CPUCache memory

βœ… Quick Summary

  • RAM = Temporary working memory (Volatile)
  • ROM = Permanent startup instructions (Non-volatile)
  • Cache/Register = Fastest memories for CPU
  • HDD/SSD/USB = Permanent external/internal storage
  • Virtual Memory = Part of disk used as extra RAM

πŸ“ FAQs

Q1. What’s the difference between RAM and ROM?
➀ RAM is temporary, volatile memory. ROM is permanent and non-volatile.

Q2. Why is SSD faster than HDD?
➀ SSD has no moving parts, so data access is quicker.

Q3. What’s the fastest memory in a computer?
➀ CPU Registers are the fastest.

Q4. Why do we need cache memory?
➀ To reduce the CPU’s data access time and improve performance.

Q5. Is flash memory volatile?
➀ No, flash memory (like in SSDs and USBs) is non-volatile.