Open In App

Introduction to memory and memory units

Last Updated : 05 Sep, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

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).

memory
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
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_memory_
Types of Computer Memory

1. 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:

  1. Data Storage: Store temporary data (RAM) and permanent data (ROM).
  2. Quick Access: CPU retrieves stored data and instructions for fast processing.
  3. Data Transfer: Move data between CPU, RAM, and storage devices.
  4. Program Execution: Provide instructions and space for active processes.
  5. 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

NameEqual ToSize (In Bytes)
Bit1 Bit1/8
Nibble4 Bits1/2 (rare)
Byte8 Bits1
Kilobyte1024 Bytes1024
Megabyte1024 Kilobytes1, 048, 576
Gigabyte1024 Megabytes1, 073, 741, 824
Terabyte1024 Gigabytes1, 099, 511, 627, 776
Petabyte1024 Terabytes1, 125, 899, 906, 842, 624
Exabyte1024 Petabytes1, 152, 921, 504, 606, 846, 976
Zettabyte1024 Exabytes1, 180, 591, 620, 717, 411, 303, 424
Yottabyte1024 Zettabytes1, 208, 925, 819, 614, 629, 174, 706, 176

Explore