Secondary Storage and Memory Units
Learn how computers store data permanently and how memory sizes are measured.
Knowledge of Computers › Fundamentals of computer sciences · 18 min read
In the previous chapter, we explored primary memory—RAM and ROM. We learned that RAM is incredibly fast but suffers from a fatal flaw: it is volatile. The moment you pull the plug or the battery dies, everything in RAM vanishes.
If computers only had RAM, you would have to type out your documents, play your games, and write your code from scratch every single time you turned the machine on. To save our work permanently, we need a different kind of storage. We need a place where data can live safely, without requiring a constant supply of electricity.
This is where Secondary Storage comes in.
If RAM is the top of your desk—where you keep the files you are actively working on right now—secondary storage is the heavy steel filing cabinet in the corner of the room. It takes a little longer to walk over and fetch a file from the cabinet, but the cabinet can hold thousands of times more documents, and those documents stay exactly where you left them when you go home for the night.
In this chapter, we will explore the physical devices that act as our digital filing cabinets: magnetic drives, solid-state drives, and optical disks. Then, we will learn the mathematical language used to measure the size of the data we put inside them—from tiny bits to massive terabytes.
The Three Families of Secondary Storage
Secondary storage devices are non-volatile, meaning they retain data without power. Over the decades, engineers have invented several clever ways to store data permanently. Today, almost all secondary storage falls into one of three technological families: Magnetic, Solid-State, and Optical.
1. Magnetic Storage: Hard Disk Drives (HDDs)
For a very long time, the Hard Disk Drive (HDD) was the undisputed king of computer storage. If you have an older desktop computer or a heavy laptop, it likely has an HDD whirring away inside it.
Magnetic storage works by using electromagnets to magnetize tiny microscopic areas on a spinning metal plate. By changing the magnetic polarity (North or South) of these tiny areas, the drive records the 1s and 0s of computer data.
To understand an HDD, imagine a classic vinyl record player, but highly advanced and sealed inside a metal box. Inside an HDD, you will find:
- Platters: These are circular disks made of glass, ceramic, or aluminum, coated with a magnetic material. A hard drive usually has several platters stacked on top of each other.
- Spindle: The motor in the center that spins the platters at high speeds. This speed is measured in RPM (Revolutions Per Minute). Standard speeds are 5,400 RPM or 7,200 RPM.
- Read/Write Head: A tiny electromagnet on the end of a mechanical arm. This head hovers just nanometers above the spinning platter—so close that a single grain of dust or a human hair would cause a catastrophic crash. It reads the magnetic signals or writes new ones.
How data is organized on the platter: The surface of the magnetic platter is not just a random sea of data. It is strictly organized like a city grid so the computer can find files quickly.
- Tracks: The platter is divided into thousands of tightly packed concentric circles, like the rings of a tree. These are called tracks.
- Sectors: Each circular track is sliced into smaller segments, like slices of a pie. These are called sectors. A standard sector holds 512 bytes of data.
The Legacy of the Floppy Disk: Before USB flash drives existed, people moved files between computers using Floppy Disks. These were small, flexible squares of magnetic film encased in plastic. They worked on the exact same magnetic principles as an HDD but were portable and very slow. The most famous version, the 3.5-inch floppy disk, held a mere 1.44 Megabytes of data—not even enough to hold one modern smartphone photo!
2. Solid-State Storage: SSDs and Flash Drives
While HDDs are cheap and can hold massive amounts of data, they have a major weakness: they rely on moving mechanical parts. Moving parts take time to physically move, they generate heat, they consume battery power, and if you drop a spinning hard drive, the mechanical arm will crash into the platter and destroy your data.
The modern solution is Solid-State Storage.
Instead of spinning disks and moving arms, an SSD looks like a simple green circuit board covered in black microchips. It stores data using a technology called NAND Flash Memory.
Inside these chips are billions of microscopic electronic components called floating-gate transistors. These transistors can trap electrical electrons inside a tiny "cage." If the cage is full of electrons, the computer reads it as a '0'. If the cage is empty, it reads it as a '1'. Because the electrons are physically trapped, the data stays there even when the power is turned off.
Why SSDs are replacing HDDs:
- Speed: Because there is no physical arm that needs to move across a disk, an SSD can find and load a file almost instantly. A computer with an SSD will boot up in seconds, whereas an HDD might take a minute or more.
- Durability: If you drop a laptop with an SSD, your data is usually perfectly safe because there are no fragile moving parts to break.
- Silence and Battery: SSDs are completely silent (no whirring disks) and use much less electricity, making laptop batteries last longer.
Other common examples of solid-state flash memory include USB Flash Drives (pen drives) and SD Cards (used in digital cameras and smartphones).
3. Optical Storage: CDs, DVDs, and Blu-ray
The third family of storage uses light—specifically, lasers—to read and write data.
When a CD or DVD is manufactured, a machine stamps millions of microscopic bumps into a spiral track on a plastic polycarbonate disc. The disc is then coated with a thin layer of reflective metal (like aluminum) so it acts like a mirror.
- The bumps are called Pits.
- The flat areas between the bumps are called Lands.
When you put the disc into your computer, a laser shines onto the spinning track. When the laser hits a flat "land," the light reflects perfectly straight back into a sensor. When the laser hits a bumpy "pit," the light scatters. The computer's sensor reads these flashes of reflected and scattered light as the 1s and 0s of your data.
Types of Optical Disks:
- CD (Compact Disc): The oldest format, originally designed for music. A standard CD holds about 700 MB of data.
- DVD (Digital Versatile Disc): Uses a thinner laser, allowing the pits and lands to be packed much closer together. A standard single-layer DVD holds 4.7 GB of data (about seven times more than a CD).
- Blu-ray Disc: Uses a blue-violet laser instead of a red one. Blue light has a shorter wavelength, meaning the data can be packed incredibly tightly. A standard single-layer Blu-ray holds 25 GB of data, making it perfect for high-definition movies.
How Data Moves: The Storage Lifecycle
To truly understand how secondary storage fits into the computer, let's trace the journey of a file. Imagine you want to open a photograph saved on your hard drive.
Step by step
- 1The CPU sends a request to the Hard Drive asking for the photograph file.
- 2The Hard Drive's mechanical arm moves to the correct track and reads the magnetic data.
- 3The Hard Drive sends a copy of this data into the RAM (Primary Memory).
- 4The CPU fetches the data from the fast RAM and processes it.
- 5The photograph appears on your monitor.
Notice that the CPU never works directly with the hard drive. The hard drive is far too slow. Secondary storage is strictly for long-term parking; when data needs to be used, it must first be copied into RAM.
Memory Units: The Language of Size
Now that we know where data is stored, we need to know how to measure it.
Just as we measure distance in meters and kilometers, or weight in grams and kilograms, we measure computer data using specific units. Because computers are electronic machines, their most basic language is simply the presence or absence of an electrical charge: ON or OFF.
The Foundation: Bits and Bytes
- Bit (Binary Digit): The smallest possible unit of data in a computer. A bit has a single binary value, either 0 or 1. Think of it as a single light switch that can only be off or on.
- Nibble: A group of 4 bits. (This is a fun, historical term that sits halfway between a bit and a byte. It frequently appears in multiple-choice questions).
- Byte: A group of 8 bits. A byte is the fundamental building block of computer storage. One byte is exactly enough space to store one single character of text, like the letter 'A', the number '7', or a question mark '?'.
The Ladder of Memory Units
Because modern computers handle billions of bytes, we use prefixes to represent larger amounts.
In the metric system (like kilometers or kilograms), the prefix "kilo" means exactly 1,000. But computers do not count in base-10 (decimal) like humans do. Computers count in base-2 (binary).
Therefore, in computer science, the multiplier is not 1,000. It is 1,024 (which is 210).
Here is the standard ladder of memory units you must memorize:
- 1 Kilobyte (KB) = 1,024 Bytes
- 1 Megabyte (MB) = 1,024 Kilobytes (KB)
- 1 Gigabyte (GB) = 1,024 Megabytes (MB)
- 1 Terabyte (TB) = 1,024 Gigabytes (GB)
- 1 Petabyte (PB) = 1,024 Terabytes (TB)
(The ladder continues to Exabyte, Zettabyte, and Yottabyte, but exams rarely test beyond Petabyte).
Bits vs. Bytes: The Capitalization Rule
There is a crucial difference between a lowercase 'b' and an uppercase 'B'.
- b stands for bit.
- B stands for Byte.
Storage capacity (like your hard drive or RAM) is always measured in Bytes (MB, GB, TB). However, internet speed and network transmission are traditionally measured in bits (Mbps - Megabits per second).
If your internet provider promises a speed of "80 Mbps" (Megabits per second), you divide that by 8 to find out your actual download speed in Megabytes. 80 Megabits ÷ 8 = 10 Megabytes per second (MB/s).
Worked Examples: Memory Conversions
In an exam, you will often be asked to convert one memory unit to another. The rule is simple:
- To convert from a larger unit to a smaller unit, you multiply by 1,024.
- To convert from a smaller unit to a larger unit, you divide by 1,024.
Example 1: How many Megabytes (MB) are in 2 Gigabytes (GB)?
- 1Identify the relationship: GB is one step larger than MB on the ladder.
- 2The multiplier is 1,024.
- 3Calculation: 2 GB × 1,024 = 2,048 MB.
Example 2: A file is exactly 3,072 Kilobytes (KB) in size. How many Megabytes (MB) is this?
- 1Identify the relationship: KB is one step smaller than MB. We are moving up the ladder, so we divide.
- 2Calculation: 3,072 KB ÷ 1,024 = 3 MB.
Example 3: How many bits are in 2 Bytes?
- 1Identify the relationship: 1 Byte = 8 bits.
- 2Calculation: 2 Bytes × 8 = 16 bits.
Example 4: (Advanced) How many Kilobytes (KB) are in 1.5 Megabytes (MB)?
- 1Identify the relationship: MB is larger than KB. We multiply by 1,024.
- 2Calculation: 1.5 × 1,024.
- 3Break it down: (1 × 1,024) + (0.5 × 1,024) = 1,024 + 512 = 1,536 KB.
Quick Revision
- Secondary Storage is non-volatile; it keeps data permanently even without power.
- HDDs (Hard Disk Drives) use magnetic platters and moving mechanical arms. Data is stored on circular tracks divided into sectors.
- SSDs (Solid-State Drives) use NAND flash memory chips. They have no moving parts, making them faster, quieter, and more durable than HDDs.
- Optical Disks use lasers to read microscopic pits (bumps) and lands (flat areas).
- Optical Capacities: CD = 700 MB, DVD = 4.7 GB, Blu-ray = 25 GB.
- Bit: The smallest unit of data (0 or 1).
- Nibble: 4 bits.
- Byte: 8 bits (enough to store one text character).
- The 1024 Rule: Because computers use binary (base-2), memory units scale by 1,024 (210), not 1,000. (1 KB = 1,024 Bytes).
- Capitalization: 'b' means bit (used for internet speeds), 'B' means Byte (used for storage size).
Related notes
- How a Computer Actually Works
Understand the basic block diagram of a computer, including the CPU, ALU, and Control Unit.
- The Five Generations of Computers
Trace the evolution of computers from early vacuum tubes to modern artificial intelligence.
- Types of Computers Explained
Learn the difference between microcomputers, mainframes, supercomputers, and hybrid systems.
- Computer Memory: RAM, ROM, and Cache
Understand how primary memory works and the difference between volatile and non-volatile storage.