What is computer memory?
Memory is the part of a computer system used to hold data and instructions so they can be accessed by the processor.
RAM
RAM (Random Access Memory) is the computer's working memory. Programs and data currently being used are kept in RAM so the CPU can access them quickly.
RAM is volatile: when power is removed, its contents are normally lost.
ROM
ROM (Read-Only Memory) traditionally refers to non-volatile memory containing data that is not normally changed during everyday use. Modern devices use several types of non-volatile firmware memory, so the simple textbook definition of ROM is useful but not the whole story.
Cache
CPU cache is a small, very fast memory close to the processor. It stores frequently needed data and instructions to reduce the time the CPU waits for memory.
| Type | Main idea | Power off? |
|---|---|---|
| Cache | Very fast, small working data near CPU | Data lost |
| RAM | Main working memory | Data lost |
| Non-volatile storage | Long-term files and programs | Data retained |
RAM is not storage. RAM helps the computer work right now; storage keeps files and programs for later.