Understanding Computer Memory: Types and Functions Explained

Rumman Ansari   Software Engineer   2024-07-28 01:16:36   624  Share
Subject Syllabus DetailsSubject Details 5 Questions
☰ TContent
☰Fullscreen

Table of Content:

What is Computer Memory?

The computer memory is one of the most important elements in a computer system. It stores data and instructions required during the processing of data and output results. Storage may be required for a limited period of time, instantly or for an extended period of time. It also relates to many devices that are responsible for storing data on a temporary or a permanent basis.

The Memory Hierarchy


The design constraints on a computer's memory can be summed up by three questions: How much? How fast? How expensive?

The Memory Hierarchy
Figure: The Memory Hierarchy

The hierarchical arrangement of storage in current computer architectures is called the memory hierarchy. The computer uses a hierarchy of memory that is organised in a manner to enable the fastest speed and largest capacity of memory as shown in figure. The memory is characterised on the basis of two key factors; capacity and access time.

Types of Memory

In general, the memory is classified into two categories as follows

  • 1. Primary memory or Main memory
  • 2. Secondary memory or Auxiliary memory
Computer Memory
Figure: Computer Memory

Note : Primary memory is more expensive than secondary memory and because of this, size of primary memory is less than that of secondary memory.

1. Random Access Memory (RAM)

Primary storage is called random access memory (RAM) because it is possible to randomly select and use any location of the memory directly store and retrieve data. It takes same time to any address of the memory as the first address. It is also called read/write memory. The storage of data and instructions inside the primary storage is temporary. It disappears from RAM as soon as power to the computer is switched off. The memories, which loose their content on failure of power supply, are called volatile memories. So RAM is volatile memory.

2. Read Only Memory (ROM)

There is another memory in computer, called Read Only Memory (ROM). It is the ICs inside the PC that form the ROM. The storage of program and data in the ROM is permanent. ROM stores some standard processing programs supplied by the manufacturers to operate the personal computer. ROM can only be read by the CPU but it cannot be changed. The basic input/output program is stored in the ROM that examines and initializes various equipment attached to the PC when switch is made ON. The memories, which do not loose their content on failure of power supply, are called non-volatile memories. ROM is non-volatile memory.

3. Programmable Read Only Memory (PROM)

There is another type of primary memory in computer, called PROM. It is not possible to modify or erase programs stored in ROM, but it is possible to store program in PROM chip. Once the programmes are written, it cannot be changed and remain intact even if power is switched off. Therefore programs or instructions written in PROM or ROM cannot be erased or changed.

4. Erasable Programmable Read Only Memory (EPROM)

It overcome the problem of PROM and ROM. EPROM chip can be programmed time and again by erasing the information stored earlier in it. Information stored in EPROM exposing the chip for some time ultraviolet light and it erases chip is reprogrammed using a special programming facility. When the EPROM is in use, information can only be read.

5. Cache Memory

The speed of CPU is extremely high compared to the access time of main memory. Therefore performance of CPU decreases due to the slow speed of main memory. To decrease mismatch in operating speed, a small memory chip is attached between CPU and Main memory whose access time is very close to the processing speed of CPU. It is called cache memory. Cache memories are accessed much faster than conventional RAM. It is used to store programs or data currently being executed or temporary data frequently used by the CPU. So each memory makes main memory to be faster and larger than it really is. It is also very expensive to have bigger size of cache memory and its size is normally kept small.

6. Registers

CPU processes data and instructions with high speed, there is also movement of data between various units of computer. It is necessary to transfer the processed data with high speed. So the computer uses a number of special memory units called registers. They are not part of the main memory but they store data or information temporarily and pass it on as directed by the control unit.