A computer has four types of memory on the AQA course. Each has a different job, so a computer needs all four.
RAM (random access memory): holds the programs that are currently running and the data they use. Needed because the CPU must be able to read and write these quickly while they run.
ROM (read only memory): holds the instructions the computer needs to start up. Needed because RAM is empty when the power comes on.
Cache: a small area of fast memory built into the processor, holding frequently used instructions and data. Needed so the CPU doesn’t have to wait for main memory as often.
Registers: memory locations on the processor that can be accessed quickly, holding the data and results for the instruction being executed. Needed because the CPU works directly on these values.
How cache size and registers affect performance is in The CPU and the fetch-execute cycle.
Memory
Where
What it holds
Volatile?
Register
On the processor
Data used by the current instruction, and its result
Yes
Cache
Built into the processor
Frequently used instructions and data
Yes
RAM
Main memory
Currently running programs and their data
Yes
ROM
Main memory
Start-up instructions
No
From registers to secondary storage: the faster the memory, the smaller and more expensive per byte it is.
Exam tipCache here is memory on the processor, not a web browser’s cache. And write “data” and “instructions”, never “information”.
Cache
A small area of fast memory built into a modern processor, holding frequently used instructions and data that the processor is likely to reuse.
Register
A memory location on a processor that can be accessed quickly.
3.4.5 Main memory v secondary storage
Main memory and secondary storage
Main memory is any form of memory that is directly accessible by the CPU (except for cache and registers). RAM and ROM are main memory.
Secondary storage is any non-volatile storage mechanism not directly accessible by the CPU. Solid state drives and magnetic hard disks are secondary storage.
To run a program kept in secondary storage, it is first copied into main memory (RAM), where the CPU can reach it.
Main memory (RAM)
Secondary storage
Accessed directly by the CPU?
Yes
No
Volatile?
RAM is volatile (ROM isn’t)
No: always non-volatile
Speed of access
Much faster
Slower
Cost per GB
Higher
Lower
Typical capacity
Smaller (e.g. 8–32 GB in a laptop)
Larger (e.g. 512 GB–4 TB)
Holds
Programs and data in use right now
Programs and files kept long term
Portable?
No
Some can be (e.g. an external drive or memory stick)
Exam tipDifferences need both sides, and the second can’t just be the first one reversed. “RAM is volatile, secondary storage is non-volatile” is one difference. “Larger” needs qualifying: say larger capacity.
Watch outRAM isn’t non-volatile, and “RAM stores memory” means nothing. RAM is memory: it stores programs and data.
Main memory
Any form of memory that is directly accessible by the CPU (except for cache and registers).
Secondary storage
Any non-volatile storage mechanism not directly accessible by the CPU.
3.4.5 RAM v ROM
RAM and ROM; volatile and non-volatile
A volatile storage device does not retain data contents when power is removed. A non-volatile storage device will retain data contents even when power is removed.
RAM is volatile main memory. It is used to hold currently running programs and associated data. It can be read from and written to. Its contents are lost when power is removed.
ROM is non-volatile main memory. It is used to hold instructions that are needed for the computer to run, especially when the computer is turned on. It can be read from but not written to. Its contents are kept when power is removed.
A desktop computer has far more RAM (many gigabytes) than ROM, and its applications are stored in secondary storage, not ROM.
RAM
ROM
Volatile?
Volatile: contents lost when power is removed
Non-volatile: contents kept when power is removed
Read/write
Read from and written to
Read from but not written to
Holds
Currently running programs and their data
Start-up instructions
Size in a desktop
Large: many gigabytes
Small
Exam tipDefine non-volatile in terms of data: “the data is retained when the power is switched off”. “The memory isn’t lost” doesn’t score.
Volatile
A volatile storage device does not retain data contents when power is removed.
Non-volatile
A non-volatile storage device will retain data contents even when power is removed.
RAM (random access memory)
Volatile main memory, used to hold currently running programs and associated data. It can be read from and written to.
ROM (read only memory)
Non-volatile main memory, used to hold instructions needed for the computer to run, especially when it is turned on. It can be read from but not written to.
3.4.5 Secondary storage
Why secondary storage is needed
RAM is volatile: everything in it is lost when the power is switched off. Programs, documents and photos must be kept somewhere that keeps data without power.
Main memory is limited: RAM is too small (and too expensive per GB) to hold every program and file a user owns.
Secondary storage is non-volatile and has a much larger capacity for its cost, so it keeps the operating system, applications and files between uses.
Some secondary storage is portable, so data can be moved between computers or kept as a backup.
Exam tipA full answer links the reason to the result: “RAM is volatile, so files would be lost when the computer is switched off; secondary storage keeps them”.
3.4.5 Magnetic storage
Magnetic storage
Magnetic devices such as hard-disk drives (HDDs) have a spinning disk and use magnetic fields to represent 0s and 1s.
Inside are one or more platters coated in magnetic material, spinning at high speed.
A read/write head on a moving arm moves across the platter to reach the right track.
Writing: the head magnetises tiny regions of the surface in one of two directions. One direction represents 0, the other represents 1.
Reading: the head detects the direction of magnetisation of each region as it passes underneath.
Data stays magnetised without power, so magnetic storage is non-volatile.
Strengths: very large capacity and low cost per GB.
Weaknesses: moving parts, so it can be damaged if dropped while running, makes some noise, uses more power, and is slower to access data because the head must move and the disk must spin to the right place.
A hard disk drive: a spinning platter and a read/write head on a moving arm.
Magnetic storage
Devices such as hard-disk drives that have a spinning disk and use magnetic fields to represent 0s and 1s.
Read/write head
The part of a hard disk drive that magnetises regions of the platter to write data and senses them to read it.
3.4.5 Solid state storage
Solid state storage
Solid state devices use non-volatile memory to store data. They have fast data access and write speeds and are durable as they do not have any moving parts.
SSDs use electrical circuits to store data persistently: the data stays when the power is off. (You don’t need to know how the circuits work.)
Examples: the solid state drive (SSD) in most laptops and phones, USB memory sticks and SD cards.
No moving parts, so they are durable (they survive knocks and vibration), silent, light, small and use little power.
Fast: there is no head to move or disk to spin, so data can be read and written very quickly, and computers start up and open files more quickly.
Weaknesses: higher cost per GB than magnetic storage, and each part of the memory can only be written a limited number of times before it wears out.
Solid state storage
Devices that use non-volatile memory (electrical circuits) to store data, with fast access and write speeds and no moving parts.
3.4.5 Solid state v magnetic
Comparing solid state and magnetic storage
Choose solid state for laptops, phones, tablets and anything carried or moved, and where speed matters (starting up, loading programs).
Choose magnetic for storing large amounts of data cheaply where speed matters less: backups, archives and servers holding many large files.
Many desktops have both: a smaller SSD for the operating system and programs (fast start-up), and a large HDD for files (cheap capacity).
Older books and videos also cover optical storage (CDs and DVDs). It is no longer on the AQA course.
Solid state (SSD)
Magnetic (HDD)
Speed of access
Faster: no moving parts
Slower: the head must move and the disk spin
Cost per GB
Higher
Lower
Capacity for the money
Smaller
Larger
Durability
No moving parts, so survives knocks
Moving parts can be damaged if dropped while running
Noise
Silent
Some noise from spinning and the arm
Power use
Lower, so longer battery life
Higher
Size and weight
Small and light
Larger and heavier
Wear
Limited number of writes
Moving parts wear out over time
Worked exampleA 1 TB SSD costs £70 and a 4 TB hard disk costs £100. Find the cost per GB of each, in pence.
£70 = 7000p; £100 = 10,000pwork in pence to avoid small decimals
SSD: 7000 ÷ 1000 = 7p per GBcost ÷ capacity
HDD: 10,000 ÷ 4000 = 2.5p per GBcost ÷ capacity
SSD 7p per GB; HDD 2.5p per GB. The HDD is cheaper per GB.
Exam tip“Cheaper” and “bigger” need qualifying: “cheaper per gigabyte”, “larger capacity for the same price”. Answers about cost and budget were praised when students explained why SSDs aren’t in every computer.
3.4.5 Cloud storage
Cloud storage
Storing data at a remote location, using magnetic and/or solid state storage, and allowing online access is known as cloud storage. Access to cloud storage is made via the Internet.
The data is still on physical drives (magnetic and/or solid state). They are just owned and run by a provider in a data centre somewhere else.
Local storage means drives in or attached to your own device.
Advantages of cloud storage over local storage
Disadvantages of cloud storage compared with local storage
Files can be accessed from anywhere, on any device with an Internet connection
No Internet connection means no access to the files
Easy to share files and work on them with other people
Large files can take a long time to upload and download on a slow connection
Capacity can be increased when needed, without buying hardware
Usually an ongoing subscription cost, which grows with the space used
The provider backs up the data and maintains the drives
Relies on the provider: outages, price changes or the provider closing
Less local storage is needed on each device
Data is held by a third party, so users must trust its security and privacy
Cloud storage: your data on someone else’s drives, reached over the Internet.
Exam tipCloud storage isn’t automatically “more secure”, and it doesn’t remove the need for secondary storage: every device still needs its own storage for the operating system and programs. Those were common wrong answers.
Cloud storage
Storing data at a remote location, using magnetic and/or solid state storage, and allowing online access via the Internet.
Local storage
Storage in, or attached to, the user’s own device.
3.4.5 Embedded systems
Embedded systems
An embedded system is a computer system built into a larger device. An example is the control system for a microwave or a washing machine.
Examples of embedded systems: the controller in a microwave, washing machine, dishwasher, central-heating thermostat, car engine management system, traffic lights or a digital camera.
Examples of non-embedded systems: a desktop PC, a laptop, a tablet. These are general-purpose computers that can run many different programs chosen by the user.
An embedded system usually has one dedicated job and runs one program, which rarely changes.
It usually has less processing power and memory than a general-purpose computer, which makes it smaller, cheaper and lower-powered.
Its program is usually stored in ROM, so it often has more ROM than RAM, and it may have no secondary storage.
Embedded systems are often programmed in assembly language, to control their specific hardware directly.
Embedded system
Non-embedded system (e.g. laptop)
Where
Built into a larger device
A stand-alone computer
Purpose
One dedicated job
General purpose: runs many programs
Processing power and memory
Usually much less
Much more
Where the program is kept
Usually ROM
Secondary storage, loaded into RAM
Secondary storage
Often none
Yes
Cost and size
Cheap and small
More expensive and larger
The embedded system inside a washing machine.
Exam tipFor a difference, write both sides: “an embedded system has one dedicated function, whereas a laptop can run many different programs”.
Embedded system
A computer system built into a larger device, such as the control system for a microwave or a washing machine.