Main memory (also known as primary memory, or primary storage) is a name given to multiple types of memory in your computer. The most talked about sub-types of main memory are Random Access Memory (RAM) and Read-only Memory (ROM) – but there’s also the important cache memory. The big question most students ask is, why do we need all three? Why can’t computers just have one big store of memory that holds everything it could need?
The answer lies in balancing three competing factors:
- Speed
- Cost
- Performance
Main memory is the type of memory that the CPU can access directly. It stores the instructions and data the computer needs to operate. When your computer is on and being used, main memory is critical to ensuring it works properly. Unfortunately, this can’t be cheap, large enough, and fast at the same time (no solution like this exists!) So, we use various types of storage in different ways to get the best benefits of all types.
Secondary storage, on the other hand, is not directly accessed by the CPU, and this is where we store our long-term documents, such as photos, videos, and installed apps. This type of storage is permanent and usually much larger and slower. When the CPU needs to access memory, it’s usually important that it is accessed quickly, and this is where main memory is essential.
RAM
When you go camping, you bring a tent. Random Access Memory is one of the most important forms of memory because it holds data and instructions while you’re camping, just like a tent stores much of the useful stuff you need when you’re out and about. RAM can read and write data so that you can actually use the apps and programs you want to interact with.

RAM usually comes in small sticks that can be plugged in or taken out of a desktop computer with ease. It is harder and not recommended that you alter RAM in other devices such as phones or games consoles.
Because RAM only stores data and instructions while the computer is powered on, it is considered volatile memory. This means that you shouldn’t expect files to be loaded next time you turn it back on!
ROM
ROM is the map that you use when you go camping – you can’t change the locations on the map, it’s just there as a reference on how to get started on your journey. In the same way, ROM is Read-only Memory – it is set by the manufacturer and installed into your motherboard, so you can’t write over it: you can only read from it. This is a good thing, however, as the ROM is really just to store the boot instructions for your computer, so you can actually start it. Otherwise you’d be stuck never able to start the computer up if you accidentally overwrote it!
These instructions are known as the BIOS (Basic Input Output System) and they are very commonly recognised as a blue screen with some white text on it. You may have seen something similar. This is often what you’ll see when your operating system (such as Windows) fails to load.
ROM is non-volatile, meaning it won’t lose its contents with the power off. This is important, otherwise you’d never be able to turn your computer back on again!
Cache
When you’re out in the woods, and you don’t have your tent with you, you’re going to need the essentials – a bottle of water, sun cream, a change of trousers. Let’s imagine your computer needing the same thing – a place to store the data and instructions it needs very frequently.
So cache is very fast, very small amount of memory (usually 200MB or less), used to store the frequently accessed data. There are different types of cache, but they all sit within the CPU and are used constantly for the most important parts. Cache is also volatile memory, meaning it will lose its contents when the power is turned off.
Secondary Storage
Though we won’t be talking about it here specifically in much detail, it’s important to remember that main memory is just one part of the equation that makes your computer even worth using. To store files long-term, we need writeable, non-volatile memory. That’s where secondary storage devices such as CDs, Hard Disk Drives (HDDs), and Solid-state Drives (SSDs) come in. They are incredibly important, otherwise nothing could ever be saved permanently.
Secondary storage is like going to the shop to buy more supplies when you’re camping – it’s slow to fetch things from, but there are a lot of options (storage space).

Misconceptions
“RAM stores files permanently.” – Nope. Only while the computer has power.
“ROM never changes.” – Well, usually true, but modern firmware can be updated. It’s true that you should never try to edit your own ROM, as it’s designed to be read-only.
“Cache is just better than RAM.” – In terms of speed, yes. But not in terms of capacity. RAM is much bigger, and therefore they are quite different. It’s important to have both, because you need speed and size in different ways at different times.
“Main memory is just RAM.” – Though RAM is commonly referred to as ‘main memory’, it is just a type of it. Remember, main memory is a term that is synonymous with primary memory or storage.
Summary
| RAM | ROM | Cache | |
| Volatile? | Yes | No | Yes |
| Read and Write? | Yes | Read only | Yes |
| Speed | Fast | Average | Fastest |
| Size | Large | Small | Tiny |
| Purpose | Running programs | Startup instructions | Frequently used data |
Test yourself on these flashcards: