What is the purpose of memory in a computer ? What are volatile and non-volatile memories ? Explain.

What is the purpose of memory in a computer ? What are volatile and non-volatile memories ? Explain.

Ans.     The function of the memory is to store information. It stores program, data, results or any other kind of information. Two or three levels of memories such as main memory, secondary memory and cache memory are provided in a digital computer. The main memory (or primary memory) is a fast memory. It stores programs along with data, which are to be executed. It  also stores necessary programs of system software, which are to be execute the user’s program. The main memory is directly addressed by the CPU. Semiconductor memories, RAMs are used as main memory. It processes random access property, and has smaller access time, about 50 ns (nanosecond). Secondary (or auxiliary) memory stores operating system, data files, compilers, assemblers, application programs, etc. the CPU does not read information directly from the secondary memory. The programs and data, if needed by CPU, are first transferred from the secondary memory to the primary memory. Then the CPU reads them from the primary memory. The results are also stored in the secondary memory. The secondary memory is a mass storage memory. It is slow but cheap. It is a permanent memory while the main memory (RAM) is volatile memory. The capacity of the main memory is comparatively much smaller than that of the secondary because of its high cost. Hard disks are used as secondary memory. Their access time is about 5-10 ns.

The cache memory is placed in between the CPU and the main memory. It is much faster than the main memory; access time about 10 ns. It stores instructions and data which are to be immediately executed. It is much costlier than the main memory. Hence, from cost consideration its capacity is kept much less than that of the main memory.

Random Access Memory (RAM) is a volatile memory. This means that it loses all its data when the power is switched off. It is also known as the main memory of the computer system that stores the data temporarily and allows the data to be accessed in any order. The data can accessed at a faster speed in RAM as compared to the secondary storage because it is the internal memory of the computer.

RAM consists of different ICs, which are mounted on a printed circuit board. RAM stores the application program and the data on which the user is currently working so that the processor can easily access the required application program and data in a less amount of time. RAM is also known as read/write memory because it can perform both read as well as write operations.

The storage capacity of RAM is usually less than the secondary storage device. RAM can be of two types – static RAM and dynamic RAM. Read Only Memory (ROM) is the memory that stores the data permanently. This means that it does not lose the data when the powers switched off. The data can be easily read from this type of memory but cannot be changed. ROM is commonly used in devices such as calculators, laser printers, etc.

ROM does not allow the random access of data rather it allows sequential access of data. It is less expensive as compared to RAM and other storage devices such as magnetic disk, etc.

ROM is divided into the following types-

Programmable Read Only Memory (PROM) can be programmed by the user for converting critical and lengthy operations into microprograms that are fused into a chip. They can be executed at a very high speed. Once operations are written into a PROM, they cannot be altered.

Erasable Programmable Read Only Memory (EPROM) can be erased and reprogrammed. Before to accept any new contents, it is removed from the processor and exposed to ultraviolet light for some time.

Share this post