Introduction to memory and memory units
Last Updated :
05 Sep, 2025
Memory is the storage space in a computer where data and instructions are kept. It is divided into small units called cells, and each cell has a unique address.
- Storage element (Cell): Stores 1 bit of data.
- Register: A memory location made of cells.
- Capacity: Total number of bits a memory can store.
- Reading: Retrieving data.
- Writing: Storing data.
Memory is essential because it allows computers to store both temporary data (used while processing) and permanent data (like system programs).
Read and Write Operation- A word is a group of bits where a memory unit stores binary information. A word with a group of 8 bits is called a byte.
- A memory unit consists of data lines, address selection lines, and control lines that specify the direction of transfer.
The block diagram of a memory unit is shown below:
Memory Unit - Data lines provide the information to be stored in memory. The control inputs specify the direct transfer. The k-address lines specify the word chosen.
- When there are k address lines, 2k memory words can be accessed.
Types of Computer Memory
Types of Computer Memory1. Cache Memory: Very fast storage, close to CPU, stores frequently used data.
2. RAM (Random Access Memory): Volatile, read/write, temporary data storage on motherboard.
- DRAM: Uses capacitors, slower, needs refreshing.
- SRAM: Uses flip-flops, faster, retains data as long as power is on.
3. ROM (Read Only Memory): Non-volatile, stores permanent system instructions, read-only.
- MROM: Pre-programmed, low-cost.
- PROM: User programmable once.
- EPROM: Can be erased using UV light and reprogrammed.
- EEPROM: Electrically erasable and reprogrammable, faster, reusable up to ~10,000 times.
4. Virtual Memory: Uses secondary storage as an extension of RAM.
5. Flash Memory: Non-volatile, fast, used in SSDs, USBs, memory cards.
6. Hybrid Memory: Combines RAM and Flash for efficiency and reduced power use.
What is Primary Memory?
It is also referred to as main memory or internal memory. It is a computer system's temporary storage component which is directly accessible by the central processing unit (CPU). It houses data for immediate processing.
Characteristics
- volatile: Data is lost upon power loss.
- High-speed access.
- Limited capacity relative to secondary storage.
- Examples: Random Access Memory(RAM), Read-Only Memory, Cache memory.
Advantages
- High-speed access: Data can be retrieved and stored very quickly.
- Directly accessible by CPU: No intermediate steps are required for data transfer.
Disadvantages
- Volatile: Data is lost when power is turned off.
- Limited storage capacity: compared to secondary storage, primary memory is relatively small.
- Expensive: Cost per unit is higher than secondary storage.
What is Secondary Memory?
Secondary memory or external memory serves as long-term storage for data and programs. Unlike primary memory, it is not directly accessible by the CPU and requires input/output operations.
Characteristics
- Non-volatile: Data persists even when the system is powered off.
- slower access speeds compared to primary memory.
- High storage capacity.
- Examples: Hard Disk Drives(HDD), Solid-State Drives(SSD), Optical drives(CD, DVD, Blu-ray).
Advantages
- Non-volatile: Data persists even when the power is turned off.
- Large storage capacity: can store vast amount of data.
- Relatively Inexpensive: cost-effective for storing large volumes of data.
Disadvantages
- Slower access time: Data retrieval is slower compared to primary memory.
- Requires input/output operations: Data transfer involves additional steps.
Read more about - Difference between Primary and Secondary Memory
Functions of Memory Unit
The memory unit of a computer has several functions:
- Data Storage: Store temporary data (RAM) and permanent data (ROM).
- Quick Access: CPU retrieves stored data and instructions for fast processing.
- Data Transfer: Move data between CPU, RAM, and storage devices.
- Program Execution: Provide instructions and space for active processes.
- Reliability: Non-volatile memory (ROM/EEPROM) keeps data safe even without power.
The size of the memory unit affects its speed, power, and capabilities. without a memory unit, the processor would have to wait longer for data retrieval.
Conversions of Units
Name | Equal To | Size (In Bytes) |
---|
Bit | 1 Bit | 1/8 |
Nibble | 4 Bits | 1/2 (rare) |
Byte | 8 Bits | 1 |
Kilobyte | 1024 Bytes | 1024 |
Megabyte | 1024 Kilobytes | 1, 048, 576 |
Gigabyte | 1024 Megabytes | 1, 073, 741, 824 |
Terabyte | 1024 Gigabytes | 1, 099, 511, 627, 776 |
Petabyte | 1024 Terabytes | 1, 125, 899, 906, 842, 624 |
Exabyte | 1024 Petabytes | 1, 152, 921, 504, 606, 846, 976 |
Zettabyte | 1024 Exabytes | 1, 180, 591, 620, 717, 411, 303, 424 |
Yottabyte | 1024 Zettabytes | 1, 208, 925, 819, 614, 629, 174, 706, 176 |