💻 GCSE Computer Science

💡 Data Explained Simply: How Computers Work 🧠

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:

ON = 1 (Electricity is flowing) | OFF = 0 (No electricity)

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.

Example: 11001010 → 128 + 64 + 8 + 2 = 202

Binary Shifts (Quick Multiplication)

Moving the bits left or right is a fast way for the computer to multiply or divide by 2.

Shift Left (←) = ×2 | Shift Right (→) = ÷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:

Images (Pixels)

An image is a grid of tiny squares called pixels.

Sound (Sampling)

The computer samples the continuous sound wave (measures it repeatedly) to turn it digital.

🗜️ 5. Data Compression (Making Files Smaller)

Compression reduces file size so data takes up less storage and transfers faster.

  1. 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).
  2. Huffman Coding: Gives the most common characters (like the letter 'e') a very short binary code, saving space overall.

✅ Quiz Time! Test Your Knowledge