Memory in Computers

Memory in Computer Systems

Role of Memory

In computers, memory is the most essential component of the normal functioning of any system. The computer system categorizes the memory for different purposes and uses. 

Memory devices are digital systems that store data either temporarily or for a long term. Digital computers have built-in memory devices that can store the data of users or manufacturers.

The concept of memory and storage can be easily conflated as the same concept; however, there are some distinct and important differences. Memory is primary memory, while storage is secondary memory. Memory refers to the location of short-term data, while storage refers to the location of data stored on a long-term basis.

Classification of Memory

The following figure represents the classification of memory:

Primary or Main Memory

Primary memory is also known as the computer system’s main memory that communicates directly within the CPU, Auxiliary memory and the Cache memory. Main memory is used to kept programs or data when the processor is active to use them. When a program or data is activated to execute, the processor first loads instructions or programs from secondary memory into main memory, and then the processor starts execution. Accessing or executing of data from primary memory is faster because it has a cache or register memory that provides faster response, and it is located closer to the CPU. The primary memory is volatile, which means the data in memory can be lost if it is not saved when a power failure occurs. It is costlier than secondary memory, and the main memory capacity is limited as compared to secondary memory.

The primary memory is further divided into two parts:

  1. RAM (Random Access Memory)
  2. ROM (Read Only Memory)
Random Access Memory (RAM)
Random Access Memory (RAM) is one of the faster types of main memory accessed directly by the CPU. It is the hardware in a computer device to temporarily store data, programs or program results. It is used to read/write data in memory until the machine is working. It is volatile, which means if a power failure occurs or the computer is turned off, the information stored in RAM will be lost. All data stored in computer memory can be read or accessed randomly at any time. There are two types of RAM:
  • SRAM
  • DRAM
DRAM: DRAM (Dynamic Random-Access Memory) is a type of RAM that is used for the dynamic storage of data in RAM. In DRAM, each cell carries one-bit information. The cell is made up of two parts: a capacitor and a transistor. The size of the capacitor and the transistor is so small, requiring millions of them to store on a single chip. Hence, a DRAM chip can hold more data than an SRAM chip of the same size. However, the capacitor needs to be continuously refreshed to retain information because DRAM is volatile. If the power is switched off, the data store in memory is lost. Characteristics of DRAM
  1. It requires continuously refreshed to retain the data.
  2. It is slower than SRAM
  3. It holds a large amount of data
  4. It is the combination of capacitor and transistor
  5. It is less expensive as compared to SRAM
  6. Less power consumption
SRAM: SRMA (Static Random-Access Memory) is a type of RAM used to store static data in the memory. It means to store data in SRAM remains active as long as the computer system has a power supply. However, data is lost in SRAM when power failures have occurred.

Read-Only Memory (ROM)

ROM is a memory device or storage medium that is used to permanently store information inside a chip. It is a read-only memory that can only read stored information, data or programs, but we cannot write or modify anything. A ROM contains some important instructions or program data that are required to start or boot a computer. It is a non-volatile memory; it means that the stored information cannot be lost even when the power is turned off or the system is shut down.

Types of ROM

There are five types of Read Only Memory:

  1. MROM (Masked Read Only Memory):
    MROM is the oldest type of read-only memory whose program or data is pre-configured by the integrated circuit manufacture at the time of manufacturing. Therefore, a program or instruction stored within the MROM chip cannot be changed by the user.
  2. PROM (Programmable Read Only Memory):
    It is a type of digital read-only memory, in which the user can write any type of information or program only once. It means it is the empty PROM chip in which the user can write the desired content or program only once using the special PROM programmer or PROM burner device; after that, the data or instruction cannot be changed or erased.
  3. EPROM (Erasable and Programmable Read Only Memory):
    It is the type of read only memory in which stored data can be erased and re-programmed only once in the EPROM memory. It is a non-volatile memory chip that holds data when there is no power supply and can also store data for a minimum of 10 to 20 years. In EPROM, if we want to erase any stored data and re-programmed it, first, we need to pass the ultraviolet light for 40 minutes to erase the data; after that, the data is re-created in EPROM.
  4. EEPROM (Electrically Erasable and Programmable Read Only Memory):
    The EEROM is an electrically erasable and programmable read only memory used to erase stored data using a high voltage electrical charge and re-programmed it. It is also a non-volatile memory whose data cannot be erased or lost; even the power is turned off. In EEPROM, the stored data can be erased and reprogrammed up to 10 thousand times, and the data erase one byte at a time.
  5. Flash ROM:
    Flash memory is a non-volatile storage memory chip that can be written or programmed in small units called Block or Sector. Flash Memory is an EEPROM form of computer memory, and the contents or data cannot be lost when the power source is turned off. It is also used to transfer data between the computer and digital devices.

 

RAM vs ROM

RAM ROM
It is a Random-Access Memory It is a Read Only Memory
Read and write operations can be performed Only Read operation can be performed
Data can be lost in volatile memory when the power supply is turned off Data cannot be lost in non-volatile memory when the power supply is turned off
It is a faster and expensive memory It is a slower and less expensive memory
Storage data requires to be refreshed in RAM Storage data does not need to be refreshed in ROM
The size of the chip is bigger than the ROM chip to store the data The size of the chip is smaller than the RAM chip to store the same amount of data
Types of RAM: DRAM and SRAM Types of ROM: MROM PROM EPROM EEPROM
Tech Amplifier Final Logo