Please write a genuine and meaningful answer to get a good ranking.
Computer memory is the storage space in computer where data is to be processed and instructions required for processing are stored.
Primary Memory (Main Memory)- Primary memory holds only those data and instructions on which computer is currently working. It has 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 reside in main memory. It is divided into two subcategories RAM and ROM.
Secondary Memory (Auxiliary Memory)- This type of memory is also known as external memory or non-volatile. 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 etc.