Representing text: ASCII and Unicode
Watch the whole lecture free
Make a free account to watch every lecture to the end: 2 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
That was the teaching part. The rest of this lecture is free with an account: 2 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
The teaching part (2 min) is free to watch. A free account opens the whole lecture: 2 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
What this lecture covers
- Every letter is a number
- Character set
- ASCII
- Some ASCII codes
- Using the order
- Capitals and small letters
- How a word is stored
Read the transcript of the teaching part
Last time
Before we start: last time, in Representing images, 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 type a WhatsApp message, the phone cannot store the letters themselves. It can only store binary. So every letter, digit, space and symbol is given its own number, and that number is stored in binary.
Character set
The list of characters a computer can use, with the unique binary value for each one, is called a character set. When you type, each character is looked up in the character set, and its binary value is stored. The values are stored one after another, in order.
ASCII
The first character set Cambridge asks about is ASCII. Standard ASCII uses seven bits for each character, so it has one hundred and twenty-eight characters. Extended ASCII uses eight bits, giving two hundred and fifty-six.
Some ASCII codes
Here are some ASCII codes. Capital A is sixty-five, B is sixty-six, C is sixty-seven: the letters are in order. Small a is ninety-seven. And the digit zero is forty-eight, not zero.
Using the order
Because the codes are in order, you can work out a code you were not given. If A is sixty-five, then E, four letters later, is sixty-nine.
Capitals and small letters
A small letter's code is always thirty-two more than its capital. A is sixty-five and a is ninety-seven. In binary, only one bit changes: the thirty-two column.
How a word is stored
Here is how the word CAT is stored. C is 0 1 0 0 0 0 1 1, A is 0 1 0 0 0 0 0 1, and T is 01010100. The three codes are stored one after the other, in order.
Chapter 1.6: Representing text
- Representing text: ASCII and Unicode 6 min
Also for IGCSE Computer Science 0478
Which topics come up most in IGCSE Computer Science 0478 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.