The Big Idea: Computers Only Know Numbers
Computers don't see or hear like us. They only understand numbers.
Everything you use—photos, videos, and this text—is broken down into binary digits (just 0s and 1s).
This unit shows how the real world becomes numbers, and how those numbers turn back into media for you to enjoy!
🔢 1. Number Systems: Base 10, Base 2, and Base 16
| System | Digits | Used By |
|---|---|---|
| Decimal (Base 10) | 0-9 | People |
| Binary (Base 2) | 0, 1 | Computers |
| Hex (Base 16) | 0-9, A-F | Programmers |
Why Binary? (The Switch)
Inside the computer, everything is a tiny electronic switch:
Why Hexadecimal? (The Shortcut)
The hexadecimal number system (often called hex) is a base-16 system. It’s commonly used in computing because it’s more compact than binary and easier for humans to read. Programmers use hex often for things like colour codes and memory addresses.
🔄 2. Converting Numbers (The Math)
Binary to Decimal
Each position in a binary number is a power of 2 (… 128, 64, 32, 16, 8, 4, 2, 1).
To convert, simply add the values where there is a 1.
Binary Shifts (Quick Multiplication)
Moving the bits left or right is a fast way for the computer to multiply or divide by 2.
💾 3. Data Size: Bits and Bytes
We measure data in these units:
| Unit | Size | Example |
|---|---|---|
| Bit (b) | 0 or 1 | The smallest possible piece of data. |
| Byte (B) | 8 bits | Roughly one text character (like 'A'). |
| Kilobyte (kB) | 1,000 Bytes | A small document. |
| Megabyte (MB) | 1,000 kB | A typical song or high-res photo. |
| Gigabyte (GB) | 1,000 MB | A full-length movie or smartphone storage. |
🖼️🎵 4. Text, Images, and Sound
Character Encoding (Text)
Letters are stored as numbers using a code:
- ASCII: Older code, mainly for basic English text. (Example: A = 65)
Unicode: Modern code that supports all world languages and emojis 😊.
Images (Pixels)
An image is a grid of tiny squares called pixels.
Resolution: The total number of pixels (width × height).
- Colour Depth: How many bits store the colour of each pixel.
Sound (Sampling)
The computer samples the continuous sound wave (measures it repeatedly) to turn it digital.
- Sampling Rate: How often the sound is measured (samples per second).
- Resolution: How many bits are used for each measurement.
🗜️ 5. Data Compression (Making Files Smaller)
Compression reduces file size so data takes up less storage and transfers faster.
- Run-Length Encoding (RLE): Looks for repeated data and replaces it with a simple count. (Saves space when there are large blocks of the same colour or number).
- Huffman Coding: Gives the most common characters (like the letter 'e') a very short binary code, saving space overall.
✅ Quiz Time! Test Your Knowledge
- What is a byte made of?
- Explain the purpose of Hexadecimal.
- If you shift a binary number left, what math function are you performing?
- What is the difference between ASCII and Unicode?
- Why is compression useful?