- 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
- 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.
- 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)
- Cache Memory:
- High-speed memory between CPU and RAM.
- Stores frequently used instructions for faster access.
- 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
- Magnetic Storage Devices:
- Hard Disk Drives (HDD)
- Floppy Disks (obsolete)
- Magnetic Tapes
- Optical Storage Devices:
- CDs, DVDs, Blu-ray Discs
- Flash/SSD Storage:
- Pen drives, Solid State Drives (SSD), Memory Cards
- Cloud Storage (Modern):
- Google Drive, Dropbox, OneDrive
Comparison: Primary vs Secondary Memory
Feature | Primary Memory | Secondary Memory |
---|---|---|
Speed | Very fast (nanoseconds access time) | Slower (milliseconds access time) |
Volatility | Mostly volatile (RAM) | Non-volatile |
Cost | Expensive | Cheaper |
Capacity | Limited (GBs) | Very large (TBs or more) |
Examples | RAM, ROM, Cache, Registers | HDD, SSD, CDs, Pen drives, Cloud |
Accessibility | Directly accessed by CPU | Needs 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).