A memory is just like a human brain. It is used to store data and instructions.Computer memory is the storage space for a 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.
- Register: Register is the memory inside the CPU.It is semiconductor memory and is fastest than any other types of memory.It is smallest in size and used by CPU while processing.
- Cache Memory: Cache memory is a very high-speed semiconductor memory which can speed up CPU.It acts as a buffer between the CPU and main memory.It is used to hold those parts of data and program which are most frequently used by CPU.
- Main Memory (Primary Memory): Primary memory is the memory from where data can be directly accessed by CPU.Primary memory holds only those data and instructions on which computer is currently working.It has limited capacity and mostly data is lost when power is switched off.It is generally made up of semiconductor device AND is not as fast as registers.The data and instruction required to be processed reside in main memory.It is divided into two subcategories RAM and ROM.
- Random Access Memory ( RAM): RAM (Random Access Memory) is the internal memory of the CPU for storing data, program and program result.It is read/write memory which stores data until the machine is working.As soon as the machine is switched off, data is erased so it is a volatile memory.RAM is of two types: Static RAM (SRAM) and Dynamic RAM (DRAM).
- Read Only Memory (ROM): ROM stands for Read Only Memory.The memory from which we can only read but cannot write on it.This type of memory is non-volatile. The information is stored permanently in such memories during manufacture.A ROM, stores such instructions that are required to start a computer. This operation is referred to as bootstrap.ROM chips are not only used by the computer but also in other electronic items like a washing machine and microwave oven.ROM is of three types: PROM (Programmable Read Only Memory), EPROM (Erasable PROM) and EEPROM (Electrical EPROM)
- Secondary Memory: Secondary memory is also known as external memory or non-volatile memory.It is slower than 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.Contents of secondary memories are first transferred to main memory, and then CPU can access it.For example disk, CD-ROM, DVD, Hard-disk, tape drive etc.