teach-ict.com logo

THE education site for computer science and ICT

1. Main Memory

What is memory?

Data and programs need to be stored in a computer system. The technology used to do this is called memory. Memory can be divided into two types: main memory and secondary storage.

The difference between the two is that main memory is directly accessible by the CPU, while secondary storage is instead used for long-term data storage.

Examples of main memory include

  • Random Access Memory (RAM)
  • ROM chips
  • Cache memory

Registers and internal cache are not considered main memory as they reside within the CPU. Hard disks and flash memory are examples of secondary storage. When the CPU needs to use programs or data from the hard disk, they are first loaded into main memory, and are accessed from there.

Main memory can hold more than one program at a time, which makes it quicker for the CPU to swap between tasks.

Secondary storage is used for holding large amounts of data and programs long-term, but can only be accessed relatively slowly.