Q. What is primary memory? Explain the different types of primary memory.

Primary memory, also known as main memory or internal memory, is the memory that is directly accessible to the CPU. It is used to store the data and instructions that the CPU is currently using. Primary memory is volatile, meaning that its contents are lost when the computer is turned off.

Primary memory is an essential component of any computer. It is responsible for storing the data and instructions that the CPU needs to run programs. Primary memory is also responsible for storing the operating system, which is the software that controls the computer’s basic functions.

The two main types of primary memory are:

  1. Random access memory (RAM): RAM is used to store data and instructions that the CPU is currently using. It is volatile, meaning that its contents are lost when the computer is turned off. RAM is the fastest type of primary memory, but it is also the most expensive.
  2. Read-only memory (ROM): ROM is used to store permanent data, such as the BIOS and firmware. It is non-volatile, meaning that its contents are retained even when the computer is turned off. ROM is slower than RAM, but it is also less expensive.

Types of RAM:

  • Static RAM (SRAM): SRAM is faster than dynamic RAM (DRAM), but it is also more expensive and consumes more power. SRAM is typically used for cache memory, which is a small amount of high-speed memory that stores frequently accessed data.
  • Dynamic RAM (DRAM): DRAM is the most common type of RAM used in computers. It is less expensive and consumes less power than SRAM, but it is also slower. DRAM is typically used for main memory.

Types of ROM:

  • Masked ROM (MROM): MROM is the simplest type of ROM. It is pre-programmed with data and cannot be changed.
  • Programmable ROM (PROM): PROM can be programmed once, but cannot be erased.
  • Erasable programmable ROM (EPROM): EPROM can be erased and reprogrammed using ultraviolet (UV) light.
  • Electrically erasable programmable ROM (EEPROM): EEPROM can be erased and reprogrammed electrically.