Computer memory is the storage space in the computer,where data is to be processed and instructions required for processing are stored. The memory is divided into large number of small parts called cells. Each location or cell has a unique address, which varies from zero to memory size minus one.

For example, if the computer has 64k words,then this memory unit has 64 * 1024 = 65536 memory locations. The address of these locations varies from 0 to 65535.

There are various units which are used to measure computer memory

  • Bit – Smallest unit of computer memory
  • Byte – 8 bit = 1 byte
  • Kilobyte – 1024 byte = 1 kb
  • Megabyte – 1024 kb = 1 mb
  • Gigabyte – 1024 mb = 1 gb
  • Terabyte – 1024 gb = 1 tb

Memory is primarily of three types −

  1. Cache Memory

  2. Primary Memory/Main Memory

  3. Secondary Memory

1- Cache Memory

Cache memory is a very high speed semiconductor memory which can speed up the CPU. It acts as a buffer between the CPU and the main memory.  It is used to hold those parts of data and program which are most frequently used by the CPU. The parts of data and programs are transferred from the disk to cache memory by the operating system, from where the CPU can access them.

Advantages of cache memory as follows −

  • Cache memory is faster than main memory.
  • It consumes less access time as compared to main memory.
  • It stores the program that can be executed within a short period of time.
  • It stores data for temporary use.

Disadvantages of cache memory are as follows −

  • Cache memory has limited capacity.
  • It is very expensive.

2- Primary Memory (Main Memory)

Primary memory holds only those data and instructions on which the computer is currently working. It has a limited capacity and data is lost when power is switched off. It is generally made up of semiconductor device. These memories are not as fast as registers. The data and instruction required to be processed resides in the main memory. It is divided into two subcategories RAM and ROM.

Characteristics of Main Memory

  • These are semiconductor memories.
  • It is known as the main memory.
  • Usually volatile memory.
  • Data is lost in case power is switched off.
  • It is the working memory of the computer.
  • Faster than secondary memories.
  • A computer cannot run without the primary memory

RAM (Random Access Memory)

RAM also known as “random access memory” it stores the data which the user currently uses or as we say it stores the data temporary in it. RAM needs power or electricity to work when the computer power is turned off then all the data in it will be erased automatically. This is a circuit which have its separate space or slot in motherboard. This allows the computer to run the software faster.

RAM is further classified into two parts

  1. SRAM
  2. DRAM

SRAM :-Known as Static RAM. The word “static” refers that the memory retains its contents as long as the power is supplied so that’s why we can say this is volatile in nature. SRAM does not need to be refreshed periodically (as we know there are so many Program swtich runs in background). SRAM is faster but more expensive than DRAM.

DRAM :-Known as Dynamic RAM. It also contains data only when electricity is available. DRAM needs to refreshed periodically due to this, this RAM works slower than SRAM. Mainly general PC uses this RAM because it is much cheaper than SRAM and requires less space.

 ROM(Read Only Memory)

 ROM :-Known as “Read Only Memory” as the word refers mainly it can only read the data which in stored in it. This memory is mainly used by our computer when We just turn on our computer. It contains BIOS of system. This is non-volatile in nature.

Mainly there are three types of ROM :-—

  1. PROM—
  2. EPROM—

PROM :-Known as “programmable Read Only memory”. In this when the data is stored then we have no right to change or alter any data to it. In this the data is written by Manufacturer company, even you can also purchase blank PROM chip but it can be programmed by special tool such as PROM programmers. In general PC’s mainly PROM is used because we don’t have to alternate data to it

EPROM :-Known as “Erasable PROM” as the word refers “erasable” means we can change or erase the data. So in EPROM we have right to change the data. In this we can change the data with the help of ultra violet rays. EPROM is much expensive than PROM.

EEPROM :-Known as “Electrically Erasable PROM” the type of ROM which can be erased by electrical charges. EEPROM can be erased one byte at anytime rather than erasing the entire chip by ultra violet rays.

3- Secondary Memory

This type of memory is also known as external memory or non-volatile. It is slower than the main memory. These are used for storing data/information permanently. CPU directly does not access these memories,  instead they are accessed via input-output routines. The contents of secondary memories are first transferred to the main memory, and then the CPU can access it. For example, disk, CD-ROM, DVD, etc.

Characteristics of Secondary Memory

  • These are magnetic and optical memories.
  • It is known as the backup memory.
  • It is a non-volatile memory.
  • Data is permanently stored even if power is switched off.
  • It is used for storage of data in a computer.
  • Computer may run without the secondary memory.
  • Slower than primary memories.

Magnetic Tape :- Magnetic tape appears similar to the tape used in music cassettes. It is a plastic tape with magnetic coating. Mainly it is used to store music, movie, etc. it is not used to store data in it because as we know it comes under sequential access and it reads data line by line so that we can’t find the exact location of data.

Magnetic Disk :- This is widely used popular storage medium for direct access secondary storage. This is the place where data are automatically save when we click on save button. It is non- volatile so that once data is stored in it will not lost when power goes off.This is the storage device where we mainly store or install OS for system.Some of the magnetic disk are as follows :-Hard Disk Floppy Disk, etc.

Hard Disk :- Hard Disk also known as “Hard Drive” or “Fixed Drive”. This is the place where we store our data or information so that we can retrieve for further use.This is the place where we install our OS so that we can run our computer. Hard disk comes fix in our system and if you require more hard disk then it comes in removable also. The average computer today comes with a 250 to 500 GB hard drive.

Floppy Disk :-  This is removable, round, flat piece of Mylar plastic,coated with a ferric oxide. this kind of disk is read and written by Floppy Disk Drive (FDD), which is a device which performs basic operations on disk including reading and writing of data to it. This was used to transfer data from one computer to another. Earlier 5¼” floppy disks were used but these disks have less storage capacity so new format of 3 1/2” floppy disk came in market. Now a days floppy disk are not used because off less storage and high rate.

Optical Disk :- This is the secondary storage medium in which you can store much more data in it. This is flat, circular, plastic disk coated with material. Optical disk is very popular because of its small size and huge storage capacity. You must have optical disk reader in your computer so that you can read or write data on it.There are two types of optical disk :-1. CD2. DVD

Compact Disk (CD):- CD.Known as “Compact Disk”, mainly used to store data, music,movie, software, etc. it can store 80 minutes of continues video recording. The space of CD is up to 700 MB. Due to its high storage capacity it is widely used. The data are store in it is in the form of “Pitts”. To avail the services of CD your computer should have CD drive.There are two types of CD :-1. CD ROM.2. CD R/W.

Digital Versatile Disk (DVD):- Known as “Digital Versatile Disk”. It is high capacity storage medium. Mainly used to store movie, music,software, etc. the storage capacity of DVD is up to 4.7gb. It looks similar to CD but due to its high storage capacity it is not cheaper as CD. To avail the facility of DVD you must have DVD drive in your computer. DVD drive also gives you facility to run CD disks too.Types of DVD :-1. DVD ROM.2. DVD R/W.

c language tutorial learn c language study c language