Memory provides storage to programs and data on a temporary or permanent basis for use in a computer or other digital electronic devices. Memory is primarily of three types Cache Memory, Primary Memory/Main Memory and Secondary Memory. Primary or Main memory is used to execute program code and store temporary data. It is divided into two subcategories RAM and ROM. RAM and ROM use different techniques to store data and have different capacities. RAM (Random Access Memory) is the internal memory of the CPU for storing data, program and program result. 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. A ROM, stores such instructions that are required to start a computer.
Cache Memory is a small high-speed memory that temporarily stores frequently used instructions and data for quicker processing by the central processor of a computer. When a computer’s central processor accesses its internal memory, it first checks to see if the information it needs is stored in the cache. If the information is not in the cache, the processor retrieves it from the main memory. Secondary memory refers to storage devices, such as hard drives and solid state drives. It may also refer to removable storage media, such as USB flash drives, CDs, and DVDs.