You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson covers the two types of primary storage — RAM (Random Access Memory) and ROM (Read-Only Memory) — as specified in OCR J277 Section 1.2.1. You need to understand their characteristics, differences, and roles within a computer system.
This lesson mainly develops AO1 (knowledge and understanding of RAM and ROM and their characteristics), with AO2 when you apply that understanding to explain the roles of each in a given real-world situation.
Primary storage (also called main memory or internal memory) is memory that the CPU can access directly via the system bus. It is used to store data and instructions that are currently being used or are about to be used.
There are two types of primary storage:
RAM is the main working memory of a computer. When you open a program, the operating system loads it from secondary storage (e.g. hard drive or SSD) into RAM so that the CPU can access it quickly.
| Feature | Detail |
|---|---|
| Volatile | Data is lost when the power is turned off |
| Read and write | Data can be both read from and written to RAM |
| Speed | Much faster than secondary storage, but slower than cache |
| Capacity | Typically 4 GB to 64 GB in modern computers |
| Purpose | Stores currently running programs, the OS, and data being processed |
Secondary storage (HDDs, SSDs) is too slow for the CPU to access directly during program execution. RAM provides a fast, temporary workspace where the CPU can quickly read and write data.
When you open multiple programs, they all need space in RAM. If RAM becomes full, the computer may slow down significantly (see the section on virtual memory).
| Type | Full Name | Key Feature |
|---|---|---|
| DRAM | Dynamic RAM | Needs to be constantly refreshed (re-energised); cheaper, used for main memory |
| SRAM | Static RAM | Does not need refreshing; faster but more expensive; used for cache |
OCR Exam Tip: If asked about the difference between SRAM and DRAM, focus on: SRAM is faster and does not need refreshing, but is more expensive. DRAM is slower, needs refreshing, but is cheaper and used for main memory.
ROM is a type of primary memory that stores data permanently. The data in ROM is typically written during manufacturing and is not easily changed by the user.
| Feature | Detail |
|---|---|
| Non-volatile | Data is retained even when the power is turned off |
| Read-only | Data can be read but generally cannot be written to by the user |
| Speed | Fast, but typically smaller capacity than RAM |
| Purpose | Stores the BIOS/UEFI (boot-up instructions) |
The most important content stored in ROM is the BIOS (Basic Input/Output System) or its modern replacement, UEFI (Unified Extensible Firmware Interface). This firmware:
| Feature | RAM | ROM |
|---|---|---|
| Volatile? | Yes — loses data when power is off | No — retains data when power is off |
| Read/Write? | Read and write | Read only (generally) |
| Speed | Fast | Fast (but typically smaller) |
| Capacity | Large (4-64 GB typically) | Small (a few MB) |
| Contents | Running programs, OS, current data | BIOS/UEFI boot instructions |
| Can be changed? | Yes, constantly | Not by the user (written at manufacture) |
The diagram contrasts the two types of primary storage and their roles:
graph TD
PS["Primary Storage<br/>(directly accessed by CPU)"]
PS --> RAM["RAM<br/>volatile, read/write"]
PS --> ROM["ROM<br/>non-volatile, read-only"]
RAM --> RAMU["Holds running OS,<br/>open programs,<br/>active data"]
ROM --> ROMU["Holds BIOS / UEFI<br/>firmware for boot"]
RAM --> DRAM["DRAM<br/>(main memory,<br/>needs refresh)"]
RAM --> SRAM["SRAM<br/>(cache,<br/>no refresh, faster)"]
Understanding how RAM and ROM work together during startup is essential:
OCR Exam Tip: A common question asks: "Why does the CPU access ROM first when the computer starts up?" Answer: Because RAM is volatile and empty when the computer is turned on, so the CPU needs the non-volatile BIOS in ROM to start the boot process.
Key Vocabulary: RAM, ROM, volatile, non-volatile, BIOS, UEFI, POST, DRAM, SRAM, primary storage.
To understand why RAM capacity matters, trace a real gaming session on a PC with 16 GB of RAM. This worked example shows where every megabyte goes, why the machine starts to stutter, and what the volatile nature of RAM means when the power is cut.
Baseline — just the OS. After Windows 11 boots, about 2.8 GB of RAM is already in use. This contains the kernel, graphics drivers, background services (Windows Security, audio subsystem, networking stack) and the desktop shell. None of this has been run by the user yet — it is simply what the OS needs to be alive. Free RAM: 13.2 GB.
Launch Discord (voice chat with friends). Discord claims roughly 520 MB for its own code, message caches and audio buffers. Free RAM: 12.7 GB.
Launch Chrome with 12 tabs. Each tab is its own process averaging 190 MB (heavier on sites like YouTube or Twitch). Twelve tabs = 2.28 GB. Free RAM: 10.4 GB.
Launch the game — a modern AAA title. The game's engine loads the executable, the shader cache, 4 GB of texture data, audio assets, level geometry and physics objects into RAM. Resident set reaches 5.6 GB. Free RAM: 4.8 GB.
Open the game's map screen. Additional map tiles stream in — another 400 MB. Free RAM: 4.4 GB.
Running total:
| Consumer | RAM used |
|---|---|
| Windows 11 + services | 2.80 GB |
| Discord | 0.52 GB |
| Chrome (12 tabs) | 2.28 GB |
| The game | 5.60 GB |
| Map data | 0.40 GB |
| Total | 11.60 GB |
Free RAM is 4.4 GB — plenty of headroom. Frame rates are smooth at 120 fps.
Now things get interesting: the player alt-tabs to Chrome and opens a large revision video, while streaming software (OBS) also launches to record gameplay. OBS claims 1.1 GB. The YouTube video tab jumps from 190 MB to 900 MB due to the video buffer. Total RAM usage climbs to 13.4 GB. Free RAM is now only 2.6 GB and Windows starts pre-paging rarely-used data to the page file on the SSD in anticipation of running out. Frame rates dip to 90 fps — not a problem, but the system is clearly working harder.
What happens when the power is cut. The player accidentally kicks the power strip; the PC dies instantly. Every one of those 13.4 GB of RAM contents — the game state, unsaved chat messages in Discord, the half-written forum post in Chrome — is lost immediately. This is the practical meaning of volatile. ROM is unaffected (the BIOS is still there ready for the next boot), as is any data that was saved to the SSD before the power cut, because SSDs are non-volatile too. But anything that only lived in RAM is gone.
Lesson for exam answers. The definition of "volatile" is not an abstract textbook phrase; it has immediate practical consequences every time you lose power. RAM is the computer's working desk — wipe the desk clean every time the lights go out, and keep a copy of anything important on the SSD.
Misconception: "RAM and ROM are basically the same thing — they are both types of memory chip that store data for the computer."
Reality: RAM and ROM are opposites on almost every axis. RAM is volatile (loses contents when powered off), read-write (the CPU modifies it constantly), large (gigabytes), and holds whatever is currently running — the OS, open applications, the document you are editing. ROM is non-volatile (retains contents forever), essentially read-only, small (megabytes), and holds the BIOS/UEFI firmware that boots the machine before any OS exists. Writing "RAM and ROM both store data" in an exam answer loses marks; the examiner wants the specific, contrasting properties.
Exam question (6 marks): Describe the differences between RAM and ROM, and explain why a computer needs both.
Grade 3-4 answer: RAM is random access memory. It stores your files while you are using them. ROM is read-only memory and it stores the BIOS. RAM is volatile so it loses data when the power is off. ROM is not volatile. A computer needs both because RAM is for running programs and ROM is for starting up.
Examiner-style commentary: Several valid points made but each only briefly stated. Would gain around 3-4 marks. No mention of why the boot problem specifically needs non-volatile memory.
Grade 5-6 answer: RAM is volatile memory that can be both read from and written to by the CPU. It stores the operating system, currently running applications, and the data being worked on. It is large (typically 8-16 GB) but loses all its contents when the computer is switched off. ROM is non-volatile memory that is essentially read-only; it retains its contents even when power is removed. It is much smaller (a few MB) and stores the BIOS or UEFI — the firmware that runs when the computer is first turned on. A computer needs both because, at boot, RAM is empty (it is volatile), so the CPU has to read the boot instructions from somewhere non-volatile — this is ROM. Once the BIOS has loaded the OS into RAM, the CPU then works from RAM for everything else.
Examiner-style commentary: Clear contrasts on volatility, read/write access, size, and contents, plus a proper explanation of why both are needed at boot. Around 5-6 marks.
Grade 7-9 answer: RAM (Random Access Memory) is volatile, read-write primary storage used by the CPU as its working memory; it holds the active portions of the operating system, running processes, the page cache and the data those processes are currently manipulating, and it is large (commonly 8-32 GB in modern consumer machines). ROM (Read-Only Memory) is non-volatile primary memory, small in capacity (typically measured in megabytes), whose contents are written at manufacture (or via a controlled firmware update) and which persist without power. ROM stores the BIOS or UEFI firmware. Both are required because of a chicken-and-egg problem at power-up: the CPU needs instructions to execute, but RAM is wiped clean whenever the machine loses power, so those first instructions cannot come from RAM. The CPU therefore begins fetching from a known address inside ROM, runs the POST to verify hardware, identifies a boot device and loads the OS kernel from secondary storage into RAM. Once the kernel is resident, execution transfers to RAM and remains there because RAM's larger size and read-write capability are essential for running the OS and applications. The two technologies are complementary rather than redundant: ROM provides guaranteed, non-volatile bootstrap code; RAM provides the large, fast, mutable workspace that a running system actually needs.
Examiner-style commentary: Precise technical contrasts, a clear account of the boot bootstrap problem, and explicit justification of why neither memory alone would suffice. Exam-quality vocabulary. Full 6 marks.
RAM is fast, but the CPU is faster still. A modern processor can execute an instruction in well under a nanosecond, yet reading a value from RAM takes roughly 50-100 nanoseconds. If the CPU had to wait for RAM on every single instruction it would spend most of its life idle. The solution is a small amount of extremely fast memory that sits between the CPU and RAM, called cache memory.
Cache is built from SRAM (the fast, no-refresh type of RAM introduced above) and is usually located on the CPU chip itself. It stores copies of the data and instructions the CPU has used most recently, on the bet that recently-used data is likely to be needed again soon — a principle called locality of reference. When the CPU needs a value it looks in cache first; if the value is there this is a cache hit and the value is returned almost instantly. If it is not there this is a cache miss and the CPU must fetch the value from the much slower RAM (and copy it into cache for next time).
Cache is organised into levels by speed and size:
| Level | Location | Typical size | Speed |
|---|---|---|---|
| L1 cache | Inside each CPU core | 32-64 KB per core | Fastest |
| L2 cache | Inside each CPU core (or shared) | 256 KB-1 MB per core | Very fast |
| L3 cache | Shared across all cores | 4-32 MB | Fast (slower than L1/L2) |
The pattern is a clear trade-off: L1 is tiny but blisteringly fast; L3 is much larger but slower. This mirrors the whole memory hierarchy — as you move away from the CPU (registers, then L1, L2, L3 cache, then RAM, then SSD, then HDD) capacity grows enormously but speed falls. Cache is the reason a computer with plenty of RAM can still feel faster with a better CPU: more or faster cache means a higher hit rate and fewer trips to slow RAM.
OCR Exam Tip: Cache is examined as part of CPU/architecture (1.1) but it is closely tied to memory. If a question asks why increasing cache improves performance, say: more data the CPU needs is held close by in fast memory, so there are more cache hits and fewer slow fetches from RAM.
RAM and ROM capacities are quoted in these units, so you must be fluent in converting between them. In the OCR J277 course the accepted convention is that each unit is 1,000 times the previous one (the decimal, or SI, convention that manufacturers print on the box):
1 byte=8 bits
1 KB=1000 bytes1 MB=1000 KB1 GB=1000 MB1 TB=1000 GB
To convert from a larger unit to a smaller unit you multiply; to go from a smaller unit to a larger one you divide.
Worked example 1 — how many bytes in 8 GB of RAM? Multiply down the chain, GB → MB → KB → bytes:
8 GB=8×1000×1000×1000=8,000,000,000 bytes
So a stick of 8 GB RAM holds eight billion bytes, or 64 billion individual bits.
Worked example 2 — express 3,500,000 KB in GB. Divide up the chain, KB → MB → GB:
3,500,000 KB÷1000=3500 MB3500 MB÷1000=3.5 GB
Worked example 3 — how many 4 MB photos fit in 2 GB of ROM-style flash? First put both quantities in the same unit. Convert 2 GB to MB:
2 GB=2×1000=2000 MB4 MB per photo2000 MB=500 photos
Always convert everything to a common unit first, then divide. A very common exam slip is to divide gigabytes by megabytes directly without converting — that gives an answer 1000 times too small.
Specimen question modelled on the OCR J277 format (6 marks):
A laptop is advertised as having "8 GB RAM and 4 MB ROM". A customer asks the salesperson why the machine needs both types of memory and why the RAM is so much larger than the ROM.
(a) State one difference between RAM and ROM in terms of volatility. [1] (b) Explain why the ROM is much smaller than the RAM. [2] (c) Explain the role of the ROM when the laptop is first switched on. [3]
Mark scheme (indicative points — award marks for equivalent correct statements):
Part (a) — 1 mark: RAM is volatile (loses its contents when power is removed) / ROM is non-volatile (keeps its contents when power is removed).
Part (b) — up to 2 marks: ROM only needs to hold the small boot firmware (BIOS/UEFI) (1); RAM must hold the whole operating system plus every running program and their data, which needs far more space (1).
Part (c) — up to 3 marks: when the laptop is switched on, RAM is empty because it is volatile (1); the CPU fetches the boot instructions from the non-volatile ROM (1); the firmware runs the POST to check the hardware and then loads the operating system from secondary storage into RAM (1).
Examiner-style commentary: Part (c) is where marks are won and lost. Weak answers say only "ROM starts the computer". Strong answers make the chicken-and-egg point explicit: RAM cannot supply the first instructions because it is wiped at power-off, so the non-volatile ROM must. To reach full marks, name the POST and describe the ROM firmware loading the OS into RAM — those are the discriminating details.
This content is aligned with OCR GCSE Computer Science (J277) specification sections 1.2 Memory and storage and 1.5 Systems software. For the most accurate and up-to-date information, please refer to the official OCR specification document.