Our computers have a lot of information to process - where does all this data get stored? Computer memory refers to the system or device used to store computer-based data temporarily or permanently. The type of hardware we use to store data depends a lot on how long we need to hold on to that information.

Primary Memory

Not all memory needs to last forever. Sometimes we just need information temporarily. For example, if we want to order food, we only need to remember the restaurant’s phone number long enough for us to dial the number - then we can forget that information until the next time we order food.

This same idea applies to running software on our computers. When a command to run a program is sent to the CPU, the CPU retrieves data from Random Access Memory, or RAM, in order to access what instructions it needs to execute. Accessing data from RAM is significantly faster than accessing data from other memory systems.

This type of data is also only stored temporarily; once we exit a program or turn off the computer, the data is lost. For example, if we exit a word-processing application before saving, anything we wrote in the document is gone.

Secondary Memory

If we upload 150 photos to our computer, the computer needs a space to permanently store the data associated with the images so that we could access the pictures anytime. This type of data would most likely be saved onto our computer’s hard drive.


Click Next when you’re ready to go to the next exercise.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?