Primary Memory
RAM (Random Access Memory) is a computer's main memory, also called primary memory. It sits between the CPU and secondary storage, and the CPU reads from it and writes to it directly rather than going through a storage device, so it is the memory the processor works with constantly.
While a program is running, both its instructions and the data it is working on sit in RAM. A photo editor, for example, keeps its own code there as well as the pixels of the picture you are retouching, and the CPU collects each instruction and each piece of data from RAM as it needs them. RAM also holds the operating system, so it is best pictured as the machine's working area: the programs and data in use are held there.
RAM is volatile, which means it needs a steady power supply to keep anything stored in it. Switch off the computer, or let a tablet's battery run flat, and every byte inside is lost. Volatile does not mean unreliable or easily damaged — the memory works perfectly; it simply cannot hold its contents without power.
For example, you spend twenty minutes typing a letter into a word processor and the power is cut before you save it. Those words existed only in RAM, so they vanish. Had you saved the file, a copy would be sitting in secondary storage and would still be there afterwards. Clearing RAM never copies anything to storage for you, so unsaved work really is gone.
Any location in RAM can be reached directly and in the same amount of time as any other. Picture a rack of 600 numbered pigeonholes: collecting the note from hole 592 takes no longer than collecting the one from hole 7, because you go straight to it instead of checking the holes in order. That equal access time for every address is what the word random refers to.
Edexcel GCSE Computer Science · Primary Memory
Edexcel GCSE Computer Science · Fetch Decode Execute Cycle