CS17: Units of Information
Understanding bits, bytes, and larger units; calculating file sizes; and comparing data quantities.
Understanding bits, bytes, and larger units; calculating file sizes; and comparing data quantities.
| Unit | Size | What It Can Store |
|---|---|---|
| Bit | 0 or 1 | A single binary digit: on/off, yes/no, true/false |
| Byte | 8 bits | A single character (in ASCII), a number from 0-255 |
| Nibble | 4 bits | A single hex digit (0-F) |
| Unit | Size (Decimal) | Equivalent |
|---|---|---|
| Kilobyte (KB) | 1,000 bytes | 10^3 bytes |
| Megabyte (MB) | 1,000,000 bytes | 10^6 bytes / 1,000 KB |
| Gigabyte (GB) | 1,000,000,000 bytes | 10^9 bytes / 1,000 MB |
| Terabyte (TB) | 1,000,000,000,000 bytes | 10^12 bytes / 1,000 GB |
| Petabyte (PB) | 1,000,000,000,000,000 bytes | 10^15 bytes / 1,000 TB |
If each character is stored using 1 byte (ASCII):
File size (bytes) = number of characters x 1
A text with 500 characters = 500 bytes
A text with 3,000 characters = 3,000 bytes = 3 KB
Image size (bits) = width x height x colour depth
A 1920x1080 image with 24-bit colour:
Size = 1920 x 1080 x 24
= 49,766,400 bits
= 6,220,800 bytes
= 6,220.8 KB
= 6.22 MB
File size (bits) = sample rate x sample resolution x duration (seconds)
A 3-minute song recorded at 44,100 Hz with 16-bit samples:
Size = 44,100 x 16 x 180
= 127,008,000 bits
= 15,876,000 bytes
= 15,876 KB
= 15.876 MB
For stereo (2 channels): multiply by 2 = 31.75 MB
Which is larger: 2,500 KB or 2 MB?
2 MB = 2 x 1,000 KB = 2,000 KB 2,500 KB > 2,000 KB So 2,500 KB is larger than 2 MB
| Item | Approximate Size |
|---|---|
| A text message | ~100 bytes |
| A word document (10 pages) | ~50 KB |
| A photo from a phone camera | ~3-5 MB |
| A song (MP3) | ~3-5 MB |
| A HD movie | ~2-4 GB |
| A hard drive | ~1-4 TB |
| Mistake | Why It's Wrong | How to Fix It |
|---|---|---|
| Confusing bits and bytes | 1 byte = 8 bits, so 100 bytes = 800 bits | Always check whether the question asks for bits or bytes |
| Using 1024 instead of 1000 | GCSE typically uses decimal (1000-based) units | Check your exam board - most use 1000 for KB, MB, GB |
| Forgetting to convert units before comparing | 2 MB vs 1500 KB cannot be compared directly | Convert both to the same unit first |
| Not including colour depth for images | Size = width x height is missing the colour depth | Image size = width x height x colour depth |
| Forgetting channels for sound | Stereo has 2 channels, mono has 1 | Multiply by number of channels for stereo sound |
Q1: How many bytes are in 3.5 KB?
Q2: A text file contains 2,000 characters stored in ASCII (1 byte per character). What is the file size in KB?
Q3: Calculate the size of a 640x480 pixel image with 8-bit colour depth in KB.
Q4: Which is larger: 0.5 GB or 600 MB? Show your working.
Q5: A sound file is recorded at 22,050 Hz with 8-bit samples for 60 seconds. Calculate the file size in MB.
โ Confusing bits and bytes โ 1 byte = 8 bits. A bit is a single 0 or 1; a byte is the smallest addressable unit of memory and can store one character.
โ Thinking 1 KB = 1000 bytes โ In computing, 1 KiB (kibibyte) = 1024 bytes (2ยนโฐ). The term KB is often used informally for 1024 bytes, though technically KB = 1000 bytes in SI units.
โ Mixing up the prefixes: kilo, mega, giga, tera โ Each prefix is 1024 times the previous: 1 KiB = 1024 B, 1 MiB = 1024 KiB, 1 GiB = 1024 MiB, 1 TiB = 1024 GiB.
โ Forgetting that file sizes and storage are measured in bytes, not bits โ Storage and file sizes use bytes (KB, MB, GB). Network speeds are often measured in bits per second (Mbps, Gbps). Don't confuse MB with Mb.
A photo is 4.2 MB. Calculate how many photos of this size can be stored on a 16 GB memory card. Show your working and state any assumptions. [3 marks]
16 GB = 16 ร 1024 MB = 16384 MB Number of photos = 16384 รท 4.2 = 3900.95... Assumption: 1 GB = 1024 MB (binary prefix) and the storage has no overhead for file system metadata. Approximately 3900 photos can be stored.
AO1 (Computational Thinking โ 40%): Demonstrate knowledge and understanding of the principles and concepts of computer science, including units of information: bits, bytes and prefixes for AQA 8525, OCR J277 & Edexcel 1CP2.
AO2 (Application โ 40%): Apply knowledge and understanding of computer science, including units of information: bits, bytes and prefixes to analyse problems in computational terms and to design, write and evaluate solutions.
AO3 (Evaluation โ 20%): Evaluate the effectiveness, correctness and efficiency of computational solutions, including units of information: bits, bytes and prefixes, and make reasoned judgements about trade-offs.
Get the best revision books and guides to boost your grades.