Not sure which lesson to do first? Find your level and get a plan →

CS Thinking · Systems, Networks & Impact · Grade 6-8

Storage

Storage is the part of a computing system that keeps data over time, even when the power is turned off.

space needed=items×bytes per item

Quick Answer

Storage is the part of a computing system that keeps data over time, even when the power is turned off. Your photos, apps, saved games and the operating system itself all live in storage, on an SSD, a hard drive, a memory card or a USB stick. Use the idea when you need to know whether something will still be there tomorrow, or whether a device has room: space needed is the number of items times the size of each. Storage is different from memory (RAM), which holds only what is running now.

Why This Matters

Storage questions come up every day: will 2,000 photos fit on a 64 GB phone, why did an unsaved essay vanish when the laptop died, why does 4K video fill a card so fast? Knowing that storage keeps data and RAM does not explains why you press save. Estimating items times size tells you, before you start, whether a backup, a download or a video project will fit.

Intuitive Explanation

Think of a desk and a filing cabinet. The desk is memory (RAM): it holds what you are working on right now and is quick to reach, but it is cleared at the end of every day. The filing cabinet is storage: slower to reach, but what you put in stays there overnight, over the holidays, for years. When you type an essay, the words sit in memory. Pressing save copies them into storage. If the battery dies before you save, the desk is cleared and the words are gone.

Storage is measured in bytes, and the sizes grow fast with the kind of data. A page of plain text is about 2 KB. A phone photo is about 3 MB, over a thousand times bigger. A minute of 4K video can take a few hundred MB. So the question 'will it fit?' is items times bytes per item: 2,000 photos at 3 MB each need 6,000 MB, which is about 6 GB.

Storage and RAM are both measured in gigabytes, which is why they get mixed up. A laptop with 16 GB of RAM and 512 GB of storage can keep far more files than it can run programs at once. A phone that says 'Storage full' needs files deleted; a phone that slows down with 40 apps open is short of RAM, and deleting photos will not help much. Ask whether the data must survive switching off: if it must, the question is about storage.

Think of it like this. Storage is the filing cabinet and RAM is the desk: you work at the desk, and anything you want to keep must go into the cabinet before you leave. That picture shows why saving matters. Where it bends: a computer moves papers between cabinet and desk in a flash, and its cabinet has a fixed size you can measure in gigabytes.

Core idea. Storage is about persistence: the data stays there after the program stops running.


When to Use

Use storage when a question asks whether data survives switching off, whether files will fit, or how much space photos, songs or videos need: multiply the number of items by the size of each. Words like save, SSD, hard drive, GB free and backup are signals. If the question is about how many programs can run at once, it is about memory (RAM); if it asks how to make files smaller so more fit, use Data Compression.

Tip. Ask: Is the question about where data stays when the power goes off, or how much room is left to keep it?

How to Recognize It

Before you work a storage problem, decide whether it is about keeping data for later, holding it while a program runs, or shrinking it.

  1. Must the data still be there after the device is switched off and on again?

    Yes means storage. If it only needs to last while a program is open, it is Memory (RAM).

  2. Are you given a number of items and a size for each, and asked whether they fit?

    Yes is a storage calculation: multiply items by size and compare with the free space. If you are only converting between bits and bytes, use Bits and Bytes.

  3. Is the problem about making files smaller so more of them fit?

    Yes points to Data Compression. Storage tells you how much room there is; compression changes how much each file needs.

  4. Does the problem ask why a device slows down while many apps are open?

    That usually points to Memory (RAM), not storage. Running out of storage mainly stops you from saving new files.

Storage vs Memory (RAM) vs Bits and Bytes vs Data Compression

All four are measured in bytes, so they blur together. Ask whether the problem is about keeping data, using it right now, counting it, or shrinking it.

Storage

Meaning
Storage keeps files, apps and the operating system on a device even when the power is off.
Key test
The data must survive a restart.
Formula
space needed=items×bytes per item
Example
500 photos at 4 MB each need about 2,000 MB, or 2 GB, of storage.

Memory (RAM)

Meaning
Memory (RAM) holds the programs and data in use right now and loses them when the power goes off.
Key test
The data only needs to last while the program runs.
Example
A laptop with 8 GB of RAM may slow down with 40 browser tabs open.

Bits and Bytes

Meaning
Bits and bytes are the units used to count data, with 8 bits making 1 byte.
Key test
You are counting or converting units, not deciding where data lives.
Formula
1 byte=8 bits
Example
A 100 megabit-per-second connection moves about 12.5 megabytes each second.

Data Compression

Meaning
Data compression rewrites a file using fewer bits so it takes up less space or sends faster.
Key test
The file's size changes; the device's space does not.
Formula
compression ratio=original sizecompressed size
Example
Zipping a 10 MB folder of text files down to 2 MB gives a compression ratio of 5.

Formula & Notation

space needed=items×bytes per item
Persistent storage maintains encoded data across program execution and power cycles, typically measured in bytes and organized into files or blocks.

Worked Examples

Example 1 — Will 9,000 photos fit?

Easy

A phone has 64 GB of storage. The operating system and apps use 22 GB, and the owner wants to keep 9,000 photos of about 3 MB each. Will they fit? (Use 1 GB = 1,000 MB.)
Show the steps and the answer
  1. Find the free space: 64 - 22 = 42 GB.

    The OS and apps live in storage too, so they already use part of the 64 GB.

  2. Find the space the photos need: 9,000 × 3 MB = 27,000 MB = 27 GB.

    Space needed is the number of items times the size of each, converted to the same unit as the free space.

  3. Compare: 27 GB is less than 42 GB, leaving 42 - 27 = 15 GB.

    With both amounts in GB, the comparison gives the answer and the room left over.

Answer: Yes. The photos need 27 GB and 42 GB is free, so about 15 GB is left.

Takeaway: Subtract what is already stored, multiply items by size, and compare in the same unit.

Example 2 — Out of storage or out of memory?

Standard

(a) A laptop with 8 GB of RAM and 256 GB of storage (200 GB free) becomes very slow when 30 browser tabs and a video editor are open. (b) A tablet with 32 GB of storage shows 'Storage almost full: 0.4 GB free' when downloading a 2 GB game. Which is a storage problem, and what helps in each case?
Show the steps and the answer
  1. (a) Check the storage: 200 GB is free, plenty of room for files.

    The slowdown appears only when many programs run together, which points to RAM, the working memory.

  2. Fix (a): close tabs or programs, or add more RAM.

    Each open program holds part of the 8 GB of RAM; deleting files would not free any of it.

  3. (b) Compare sizes: the game needs 2 GB and only 0.4 GB is free, a shortfall of 2 - 0.4 = 1.6 GB.

    A downloaded game is written to storage to keep, so this is a storage problem.

  4. Fix (b): delete or move at least 1.6 GB of files, such as old videos or unused apps.

    Freeing that much storage lets the 2 GB game fit.

Answer: (a) is a memory (RAM) problem: close programs or add RAM. (b) is a storage problem: free at least 1.6 GB before downloading.

Takeaway: Slow with many programs open points to RAM; 'not enough space' for files points to storage.

Example 3 — Find the mistake: counting files instead of bytes

Application

Ella plans to film a 3-hour school concert in 4K on an empty 64 GB card. She says: 'It's only one video file, and my 500 photos took up just 1.5 GB, so it will easily fit.' The camera's manual says 4K video uses 375 MB per minute. Find the mistake and work out whether it fits. (Use 1 GB = 1,000 MB.)
Show the steps and the answer
  1. Spot the mistake: Ella judges size by the number of files, not by how much data each holds.

    One video file stores thousands of frames, so it can be far bigger than hundreds of photos together.

  2. Convert the time: 3 hours × 60 = 180 minutes.

    The manual gives the size per minute, so the time must be in minutes.

  3. Multiply: 180 × 375 MB = 67,500 MB = 67.5 GB.

    Space needed is items times size, with minutes of video as the items.

  4. Compare: 67.5 GB is more than 64 GB, short by 3.5 GB; 64,000 ÷ 375 is about 170, so the card fills after about 170 minutes.

    The last 10 minutes or so of the concert would not be recorded.

Answer: It does not fit: 3 hours of 4K needs 67.5 GB, but the card holds 64 GB, so it fills after about 170 minutes. Ella needs a bigger card, a second card, or a lower video resolution.

Takeaway: Estimate space from size per item, not from the number of files; 4K video adds hundreds of MB every minute.

Where You'll See It

  • A phone running out of space for photos

    Each photo takes up bytes in storage; when storage fills, you can't save more photos until you delete some — storage is the filing cabinet that holds your files even when the phone is off.

  • Saving a school document before shutting down

    While you type, the document lives in memory (RAM); clicking 'save' writes it to storage so it survives after the power goes off and you can open it tomorrow.

  • Estimating space for a playlist

    If one song is about 4 MB and you want 250 songs, you need roughly 250 x 4 = 1000 MB (about 1 GB) of storage — items times bytes per item.

Common Mistakes

  1. The slip: Storage and RAM (memory) are the same thing, both measured in gigabytes.

    Why it's tempting: Both are measured in GB and both 'hold data,' so they seem interchangeable.

    Instead: Storage is persistent (keeps data with the power off, like a filing cabinet); RAM is temporary working memory (cleared when power is off, like a desk). Running out of one is a different problem than the other.

  2. The slip: Deleting an app removes all of its saved data.

    Why it's tempting: Removing the app icon feels like erasing everything connected to it.

    Instead: Deleting an app often leaves behind saved files, downloads, or cloud data; the app's data isn't always removed with the program.

  3. The slip: A bigger file always means a longer document; pictures and videos are small.

    Why it's tempting: Text is what we type, so it feels like the 'main' content.

    Instead: Images, audio, and especially video are far larger per item than text; file size grows fast with media, which is why storage fills up and compression matters.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Each photo on a phone is about 3 MB. How much storage do 500 photos need? Give the answer in MB and in GB, using 1 GB = 1,000 MB.

    Hint: Multiply the number of items by the size of each one.

  2. A 64 GB tablet has 12 GB used by the system and 20 GB used by apps. Each movie is 4 GB. How many whole movies can you download?

    Hint: Find the free space first, then divide by the size of one movie.

  3. One minute of video takes about 100 MB, and one minute of music about 1 MB. A student records a 30-minute video. About how many minutes of music would fit in the same space?

    Hint: Work out the size of the whole video in MB first.

  4. A security camera saves 2 MB of video every minute, all day and night. Its memory card holds 32 GB (1 GB = 1,000 MB). How many full days of video fit before it must record over old footage?

    Hint: Find how many MB one whole day uses, then change it to GB.

  5. Your 16 GB drive is full. Option 1: buy a 128 GB memory card. Option 2: zip a 900 MB folder of text files down to 200 MB. Which option adds storage, and which is data compression? How much space does option 2 free?

    Hint: One option gives you a bigger container; the other makes the files smaller.

  6. Kai says: "My phone has 8 GB of RAM, so it can keep 8 GB of photos saved even after I turn it off." What is wrong?

    Hint: What happens to the contents of RAM when the power goes off?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why does a new 1 TB drive show less space than the box says?

Two reasons. Makers count 1 TB as 1,000,000,000,000 bytes, but Windows counts a gigabyte as 230=1,073,741,8242^{30} = 1{,}073{,}741{,}824 bytes, so the same drive shows up as about 931 GB. Also, the operating system and the apps that come with a device take up part of the storage before you save anything. Nothing is missing; the space is counted and used differently.

Why does an SSD make a computer faster than a hard drive?

A hard drive stores data on spinning metal disks and has to move a tiny arm to the right spot before each read, which takes a few milliseconds every time. An SSD has no moving parts; it reads flash memory chips electronically, so it finds data far faster. Programs open quicker and the computer starts in seconds. Hard drives are still sold because they cost less per gigabyte.

If I delete a file, is it really gone?

Often not right away. Deleting usually moves a file to a recycle bin or trash folder first. Even after you empty that, the device may only mark the space as free, and the old bytes stay until new data is written over them, which is why recovery tools can sometimes bring files back. Modern phones and SSDs often encrypt or wipe that space soon after, so recovery is much harder there.

Is cloud storage really in a cloud?

No. Cloud storage is ordinary storage, mostly hard drives and SSDs, inside large buildings called data centers run by companies. When you upload a photo, it travels over the internet and is saved on their drives, usually with copies in more than one place in case a drive fails. You need an internet connection to reach it, and the company's rules decide who else can see it.

Learning Path

Storage

You are here

You should know Computing System (storage is one of its hardware parts) and Bits and Bytes (the units storage is measured in: KB, MB, GB). Storage adds the idea of keeping data with the power off, and estimating space as items times size. Next, Data Compression shows how to shrink files so more of them fit in the same storage.

See Also