Secondary storage keeps data in three different ways: with magnetism, with light or with trapped electrons. This lesson explains how magnetic, optical and solid-state storage work, with examples of each. It then compares storing data in the cloud with storing it locally.
about 25 min1 simulation1 practice question
Lesson 2 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
Three ways to keep data
A hard disk, a Blu-ray disc and a USB drive all keep data when the power is off. But inside, they work in three very different ways.
Magnetic storage
A hard disk drive (HDD) is magnetic storage.
A hard disk platter seen from above, drawn as circles. Three tracks are shown as rings, and lines from the centre divide each track into sectors. One sector is shaded. A read/write head on an arm reaches over the platter from the side, and a curved arrow shows the platter spinning.
It has one or more round platters with a magnetic coating. The platters spin very fast.
Each platter is divided into circles called tracks, and each track into parts called sectors.
A read/write head on a moving arm sits just above the platter. To write, the head uses an electromagnet to magnetise tiny areas one way or the other, for 1 and 0. To read, the head detects which way each area is magnetised.
An HDD has a large capacity for a low cost. But it has moving parts, so it is slower to reach data than a solid-state drive, and a knock can damage it.
Optical storage
CD, DVD and Blu-ray discs are optical storage.
A side view of part of an optical disc. The surface has a row of pits, which are dips, and lands, which are the flat parts between them. A laser beam shines up onto the surface, and a reflected beam goes to a sensor.
Data is kept along a long spiral track on the disc, as tiny pits and flat areas called lands.
To write, a laser burns the pits into the disc.
To read, a weaker laser shines on the track. Pits and lands reflect the light differently, and a sensor turns the pattern into binary.
A DVD holds more than a CD, and a Blu-ray disc holds more than a DVD. Blu-ray uses a blue laser, which has a shorter wavelength than the red laser of a DVD, so its pits can be smaller and closer together.
Solid-state storage
Solid-state storage, also called flash memory, has no moving parts. It uses NAND or NOR technology. These are two ways of wiring together millions of tiny transistors.
Each memory cell is a transistor with two gates: a control gate and a floating gate.
To store data, electrons are pushed into the floating gate, where they stay trapped even with no power. Whether a cell holds trapped electrons gives a 0 or a 1.
Examples: the solid-state drive (SSD), the SD card and the USB drive.
Solid-state storage is fast, because there is nothing to spin or move. It uses little power and is not easily damaged by a knock. That is why phones and most laptops use it.
Cloud storage
Cloud storage keeps your data on servers owned by a company, in a building far away. You reach it over the internet. Storing data locally means keeping it on your own device, such as the SSD in your laptop. Cloud storage still needs physical servers and storage devices. They are just not yours.
Advantages of the cloud, compared with storing locally:
you can reach your files from anywhere with an internet connection, on any device;
you do not have to buy, look after or replace the storage hardware;
it is easy to share files and work on them with other people;
you can buy more space at any time, and the company keeps backup copies.
Disadvantages of the cloud:
with no internet connection you cannot reach your files, and a slow connection makes large files slow to load;
the security of your data depends on the company, and data can be stolen by hackers;
you usually pay a fee, every month or every year;
if the company has a fault or closes, you could lose your data.
Practise with new numbers
Try it in Python
The program works out the free space on a card after three videos, and how many photos still fit. It uses 1024 for every step between units, as the syllabus requires.
Common mistakes
Mixing up pits and lands with tracks and sectors. Pits and lands are on optical discs. Tracks and sectors are on magnetic platters.
Saying an SSD has a spinning disc. Solid-state storage has no moving parts.
Using 1000 for storage sums. Each step from KiB to MiB to GiB is 1024.
Saying the cloud needs no hardware. It needs servers and storage devices, owned by someone else.
Remember these
Magnetic (HDD): platters, tracks and sectors, electromagnets.
Optical (CD, DVD, Blu-ray): a laser makes and reads pits and lands.
Solid-state (SSD, SD card, USB drive): NAND or NOR flash, transistors with control gates and floating gates. No moving parts.
Cloud storage is reached remotely over the internet. Local storage is on your own device.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
What is a platter divided into?
What reads the pits and lands on a DVD?
Name two examples of solid-state storage.
Give one advantage and one disadvantage of cloud storage for a student.
Why is an SSD less likely than an HDD to be damaged when a laptop is dropped?
References
Cambridge International, IGCSE Computer Science 0478 syllabus (2026, 2027 and 2028), section 3.3 Data storage, outcomes 3, 5 and 6: magnetic, optical and solid-state storage, and cloud storage.
Enroll free in Storage, the Cloud and Network Hardware
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.