How This Works
For each scenario, predict what will happen before revealing the answer. This helps you develop intuition about how characters, images, and sound are represented digitally.
ASCII Character Codes
In ASCII, the character 'A' has the code 65.
What is the ASCII code for 'D'?
Answer: 68
ASCII characters are logically ordered. If A = 65, then B = 66, C = 67, D = 68.
You can always calculate: 65 + (position in alphabet - 1). D is the 4th letter, so 65 + 3 = 68.
Bits and Characters
ASCII uses 8 bits per character and can represent 256 different characters.
If a character set used only 6 bits per character, how many characters could it represent?
Answer: 64
Number of characters = 2bits
With 6 bits: 26 = 64 characters
This would be enough for uppercase letters (26) + digits (10) + some symbols, but not lowercase!
Text File Size Comparison
You have the word "HELLO" stored in two text files:
- File A uses ASCII (8 bits per character)
- File B uses Unicode (16 bits per character)
How much larger is File B than File A?
Answer: 2× larger
File A: 5 characters × 8 bits = 40 bits
File B: 5 characters × 16 bits = 80 bits
80 ÷ 40 = 2× larger. Unicode's extra bits mean larger file sizes, but more characters can be represented.
Character Set Choice
A website needs to display content in Japanese, Arabic, and English, including emojis.
Which character set should be used?
Answer: Unicode
ASCII only supports 256 characters - only English letters and basic symbols.
Unicode supports over 140,000 characters including:
- All world languages (Japanese, Arabic, Chinese, etc.)
- Mathematical symbols
- Emojis
For multilingual content, Unicode is the only choice, despite larger file sizes.
Doubling Resolution
An image is 1000 × 500 pixels with 24-bit colour depth.
If you double BOTH the width AND height (to 2000 × 1000), how much larger will the file be?
Answer: 4× larger
Original: 1000 × 500 = 500,000 pixels
New: 2000 × 1000 = 2,000,000 pixels
2,000,000 ÷ 500,000 = 4× more pixels
Key insight: Doubling both dimensions quadruples the total pixels (2 × 2 = 4).
Colour Depth Impact
An image uses 8-bit colour depth (256 colours).
If you increase to 24-bit colour depth (16.7 million colours), how much larger will the file be?
Answer: 3× larger
At 8-bit: Each pixel uses 8 bits
At 24-bit: Each pixel uses 24 bits
24 ÷ 8 = 3× more bits per pixel = 3× larger file
The number of colours increased massively (256 to 16.7 million), but the file only tripled!
Image Quality Trade-off
You need to email a photo but the file is too large. You can either:
- Reduce resolution from 4000×3000 to 2000×1500
- Reduce colour depth from 24-bit to 8-bit
Which will reduce the file size more?
Answer: Reducing resolution
Resolution reduction:
Original: 4000 × 3000 = 12,000,000 pixels
New: 2000 × 1500 = 3,000,000 pixels
Reduction: 4× smaller (÷4)
Colour depth reduction:
24 bits → 8 bits = 3× smaller (÷3)
Resolution wins! But colour depth reduction may look worse (banding, fewer shades).
Sample Rate Comparison
CD quality audio uses a sample rate of 44,100 Hz (44.1 kHz).
How many samples are taken in 1 second of CD audio?
Answer: 44,100 samples
Sample rate is measured in Hertz (Hz), which means "per second".
44,100 Hz = 44,100 samples per second
That's over 44 thousand snapshots of the sound wave every second!
Duration and File Size
A 30-second audio clip at CD quality (44.1 kHz, 16-bit, mono) is 2.6 MB.
How large would a 2-minute clip be at the same quality?
Answer: 10.4 MB
2 minutes = 120 seconds
30 seconds = 2.6 MB
120 ÷ 30 = 4× longer
2.6 × 4 = 10.4 MB
File size scales linearly with duration (double the time = double the file).
Stereo vs Mono
A mono audio file is 5 MB.
If you record the same audio in stereo (same sample rate, bit depth, duration), how large will it be?
Answer: 10 MB
Stereo audio has two channels (left and right).
Each channel needs to store separate audio data.
Stereo = Mono × 2
5 MB × 2 = 10 MB
Bit Depth Impact
An audio file uses 8-bit depth. You upgrade to 16-bit depth (keeping sample rate and duration the same).
What happens to the file size?
Answer: Doubles
Bit depth is the number of bits per sample.
8-bit → 16-bit = 2× more bits per sample
Same number of samples, but each takes twice as much space.
Benefit: 16-bit has 65,536 volume levels vs 256 for 8-bit, giving much better dynamic range.
Image Metadata
You receive an image file. Without metadata, the computer wouldn't know:
Which of these would be MOST essential for displaying the image correctly?
Answer: Width and height in pixels
Without knowing the dimensions, the computer can't arrange the pixels correctly!
Imagine receiving a stream of colour values - how would you know where each row ends?
Date, camera model, and GPS are useful metadata but not essential for display.
Your Progress
0 / 12 correct