ExamYard Lectures

Character sets, run-length encoding and compression

A Level Computer Science 9618 · Chapter 1, Information representation · 6-minute lecture

The teaching part (1 min) is free to watch. A free account opens the whole lecture: 5 practice questions, 1 real past-paper question with the answer explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.

What this lecture covers

  1. Every letter is a number
  2. ASCII
  3. Storing a word
Read the transcript of the teaching part

Last time

Before we start: last time, in Bitmap images, vector graphics and sound, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.

Every letter is a number

When you press the letter A on a keyboard, the computer does not store a letter. It stores the number sixty-five. A character set is the agreed list of numbers. And once data is stored as numbers, we can often squeeze it into fewer bits.

ASCII

ASCII uses seven bits, which gives 128 different characters: letters, digits, punctuation and control codes. Extended ASCII uses eight bits, which gives 256 characters. Codes are in order. Capital A is 65, B is 66, and so on. Lower case a is 97, exactly 32 more.

Storing a word

The word HOUSE is stored as five codes, one for each letter. H is 72, O is 79, U is 85, S is 83, E is 69. Each is stored as a binary number. The order of the codes keeps the order of the letters.

Chapter 1: Information representation

Also for A Level Computer Science 9618

Which topics come up most in A Level Computer Science 9618 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.