Courses / Application of ICT (GEN-103) – BS 1st Semester

Week 4 Theory – Memory and Storage Devices

Week 4 – Storage Units and Memory · 70 min read · 42 MCQs to check yourself

Storage units

The smallest unit of data is a bit (binary digit: 0 or 1).

Unit Equal to
1 Nibble 4 bits
1 Byte (B) 8 bits (stores one character, e.g. "A")
1 Kilobyte (KB) 1024 bytes (2¹⁰)
1 Megabyte (MB) 1024 KB
1 Gigabyte (GB) 1024 MB
1 Terabyte (TB) 1024 GB
1 Petabyte (PB) 1024 TB
1 Exabyte (EB) 1024 PB
1 Zettabyte (ZB) 1024 EB
1 Yottabyte (YB) 1024 ZB

Order to remember: B – K – M – G – T – P – E – Z – Y. (Manufacturers of disks often use 1000 instead of 1024, which is why a "1 TB" drive shows about 931 GB in Windows.)

Worked example: 2 GB = 2 × 1024 MB = 2048 MB = 2048 × 1024 KB = 2,097,152 KB.

Memory hierarchy

 Fastest, smallest, most expensive per byte
        Registers (inside CPU)
        Cache memory (L1, L2, L3)
        Main memory – RAM
        Secondary storage – SSD / Hard disk
        Removable & offline – optical disc, USB, tape, cloud
 Slowest, largest, cheapest per byte

Primary memory (main memory)

Primary memory is directly accessed by the CPU. It holds the programs and data currently in use.

RAM – Random Access Memory

Types of RAM

SRAM (Static RAM) DRAM (Dynamic RAM)
Built from Flip-flops (transistors) Capacitors + transistors
Refreshing Not needed while powered Must be refreshed thousands of times per second
Speed Faster Slower
Cost / density Expensive, less storage per chip Cheaper, more storage per chip
Used as Cache memory Main memory of computers

Modern DRAM is SDRAM (synchronous DRAM) in its DDR versions – DDR3, DDR4, DDR5 – each faster and more power-efficient.

ROM – Read Only Memory

Types of ROM: PROM (programmable once by the user), EPROM (erasable with ultraviolet light and reprogrammable), EEPROM (erasable electrically, byte by byte; flash memory is a type of EEPROM).

RAM ROM
Volatile Non-volatile
Read and write Mostly read only
Holds current programs and data Holds start-up (boot) instructions/BIOS
Large (4–64 GB) Small
Temporary storage Permanent storage

Cache memory

Secondary memory (auxiliary storage)

Non-volatile, large, cheaper, slower than primary memory; not directly accessed by the CPU (data is first loaded into RAM).

Primary memory Secondary memory
Directly accessed by CPU Not directly accessed
Fast, expensive Slower, cheaper
Small capacity Very large capacity
Mostly volatile (RAM) Non-volatile
RAM, ROM, cache HDD, SSD, CD/DVD, USB, memory card

Storage technologies: magnetic (hard disk, tape), optical (CD, DVD, Blu-ray), solid-state/flash (SSD, USB, memory cards).

Hard disk drive (HDD)

A hard disk stores data magnetically on rigid circular platters coated with magnetic material.

Parts

Organisation of data

Working of a hard disk: when the computer asks for a file, the controller finds its location; the platters spin; the actuator moves the head to the right track (seek time); the head waits until the sector rotates under it (rotational delay/latency); then data is read or written by magnetising tiny areas (transfer time). Access time = seek time + rotational latency + transfer time.

SSD (Solid-State Drive): stores data in flash memory chips; no moving parts → much faster, silent, shock-resistant, low power, but more expensive per GB.

RAID – Redundant Array of Independent (Inexpensive) Disks

RAID combines several disks into one logical unit to improve performance, reliability (fault tolerance) or both.

Level Technique Benefit Minimum disks
RAID 0 Striping – data split across disks Fastest; no fault tolerance 2
RAID 1 Mirroring – identical copy on two disks Survives one disk failure; uses 50% capacity 2
RAID 5 Striping with distributed parity Speed + survives one disk failure 3
RAID 6 Striping with double parity Survives two disk failures 4
RAID 10 (1+0) Mirroring + striping Fast and redundant 4

RAID is used in servers and data centres. RAID is not a backup – deleting a file deletes it on all disks.

Optical disk storage

Data is written by a laser burning tiny pits and lands on a reflective surface; a laser reads them by reflection.

Disc Capacity Notes
CD (Compact Disc) about 700 MB CD-ROM (read only), CD-R (write once), CD-RW (rewritable)
DVD (Digital Versatile Disc) 4.7 GB single layer, 8.5 GB dual layer Shorter-wavelength red laser; DVD-ROM, DVD±R, DVD±RW
Blu-ray Disc 25 GB single, 50 GB dual layer Blue-violet laser with shorter wavelength

Flash memory storage systems

Flash memory is non-volatile, solid-state (EEPROM-based) memory with no moving parts.

Other types of storage systems

Memory & Storage – Crash Course Computer Science #19

How do hard drives work? – TED-Ed

Summary

Short and long questions

1. Write the units of memory in ascending order.

Model answer

Bit, nibble, byte, kilobyte, megabyte, gigabyte, terabyte, petabyte, exabyte, zettabyte, yottabyte.

2. Convert 2 GB into KB.

Model answer

2 GB = 2 × 1024 MB = 2048 MB; 2048 × 1024 KB = 2,097,152 KB.

3. What is primary memory? Explain RAM, its types, ROM, its types and cache memory.

Model answer

Primary memory is the main memory directly accessed by the CPU; it holds data and programs currently in use. RAM: read/write, volatile; types: SRAM (flip-flops, fast, no refresh, used as cache) and DRAM (capacitors, needs refresh, cheaper, used as main memory; modern DDR4/DDR5 SDRAM). ROM: non-volatile, read-only, stores BIOS/firmware; types: PROM (programmed once), EPROM (erased by ultraviolet light), EEPROM (erased electrically; flash memory). Cache: small high-speed SRAM between CPU and RAM (L1, L2, L3) that stores frequently used data to reduce CPU waiting time; a cache hit gives fast access.

4. Differentiate between SRAM and DRAM.

Model answer

SRAM uses flip-flops, needs no refreshing, is faster and costlier, used as cache. DRAM uses capacitors, must be refreshed, is slower and cheaper, used as main memory.

5. What is cache memory? Why is it used?

Model answer

Cache is a small, very fast SRAM memory between the CPU and RAM. It stores frequently used data and instructions so the CPU can get them quickly, which increases overall speed.

6. Differentiate between RAM and ROM.

Model answer

RAM is volatile, read/write, holds currently running programs and data, and is larger. ROM is non-volatile, mostly read-only, holds start-up instructions (BIOS/firmware) and is smaller.

7. Explain the structure and working of a hard disk. Also explain RAID levels.

Model answer

Structure: a sealed case contains magnetic platters on a spindle rotating at 5400–15,000 RPM; read/write heads on an actuator arm float above each surface; a controller board manages transfers. Each surface is divided into tracks and sectors; same tracks on all platters form a cylinder. Working: the controller locates the file; the arm moves the head to the track (seek time); the platter rotates the sector under the head (rotational latency); the head reads by sensing or writes by magnetising tiny regions (transfer time). Access time = seek time + latency + transfer time. RAID: RAID 0 – striping, fastest, no fault tolerance (2+ disks); RAID 1 – mirroring, survives one failure (2 disks); RAID 5 – striping with distributed parity, survives one failure (3+ disks); RAID 6 – double parity (4+); RAID 10 – mirroring + striping (4+). RAID is used in servers but does not replace backups.

8. What is RAID? Why is it used?

Model answer

RAID (Redundant Array of Independent Disks) combines multiple disks into one logical unit to increase speed (striping) and/or protect data against disk failure (mirroring/parity).

9. Define track, sector and cylinder.

Model answer

A track is a concentric circle on a disk surface; a sector is a pie-shaped part of a track (smallest addressable unit); a cylinder is the set of the same track on all platters.

10. Compare primary and secondary memory and describe optical and flash storage devices.

Model answer

Primary vs secondary: primary memory is directly accessed by the CPU, fast, expensive, small and mostly volatile (RAM); secondary memory is not directly accessed, slower, cheaper, large and non-volatile (HDD, SSD, CD, USB). Optical storage: a laser writes pits/lands and reads them by reflection. CD ≈ 700 MB; DVD 4.7 GB (single layer) / 8.5 GB (dual); Blu-ray 25/50 GB using a blue-violet laser. Variants: ROM (read only), R (write once), RW (rewritable). Flash storage: solid-state EEPROM memory with no moving parts: USB flash drives, SD/microSD memory cards (read with card readers) and SSDs. Fast, light, durable and low-power, but with limited write cycles.

11. Differentiate between CD-ROM, CD-R and CD-RW.

Model answer

CD-ROM: data written at the factory; can only be read. CD-R: user can write once, then read many times. CD-RW: can be written, erased and rewritten many times.

12. What is cloud storage? Give two examples.

Model answer

Cloud storage keeps files on remote servers on the Internet so they can be accessed from any device. Examples: Google Drive, OneDrive, Dropbox, iCloud.

This lesson ends with a quiz of 42 MCQs. Open the lesson on PrepOasis to take it and save your progress.

Previous: Week 3 Lab 3 – PowerPoint: Interface, Creating, Designing and Saving a Presentation · Next: Week 4 Lab 4 – PowerPoint: Formatting, Clip Art, Drawings, Pictures, Media, Animations and Transitions

All lessons in Application of ICT (GEN-103) – BS 1st Semester