OCR J277 GCSE Computer Science · 1.2 Memory and Storage
Stretch tasks Storing Characters: ASCII and Unicode
Quiz Challenge
A quiz game against four computer players, then short and long written answers.
- Quiz Blitz12 questions against the clock
- Quick Fire4 short answers
- Big Think2 long answers
About 20 minutes
This or That
Pixel the cat asks 8 questions. Each has two answers: pick the right one.
- Two answers to every question
- A fish treat for every right answer
- Streaks win Pixel shades, then a party hat
About 4 minutes
Memory Match
Flip the cards two at a time to match each term card to its meaning card.
- 12 cards: each term has a meaning
- One peek at every card
- Combo points for pairs found in a row
6 pairs, about 4 minutes
Sort It
Sort each statement into the right box, like the tick-box tables in the exam.
- 10 cards to sort into 3 boxes
- Drag a card, tap a box or press its number
- Combo points for cards sorted in a row
10 cards, about 4 minutes
The games need JavaScript. Every question is below, with the answers at the end.
Read the lesson: Storing Characters: ASCII and Unicode
Storing Characters: ASCII and Unicode: the questions
Quiz Challenge, round 1: Quiz Blitz
What is a character set?
- A list of characters, each with a unique binary code
- The fonts installed on a computer
- The keys on a keyboard
- A type of compression
How many bits does standard ASCII use per character?
- 16
- 32
- 7
- 8
If A is 65 in ASCII, what is the code for E?
The character '5' is stored as the number 5.
- True
- False
How many characters can standard ASCII represent?
- Over a million
- 128
- 256
- 65,536
Which TWO are advantages of Unicode over ASCII?
Tick 2.
- It only needs 7 bits
- It can represent almost every written language
- It includes emoji and mathematical symbols
- It makes text files smaller
- It uses fewer bits per character
The first 128 Unicode codes are the same as ASCII.
- True
- False
Why are Unicode text files larger than ASCII ones?
- Unicode stores every font
- Unicode files cannot be compressed
- Each character uses more bits
- Unicode adds pictures to text
If a is 97 in ASCII, what is the code for d?
Extended ASCII uses 8 bits. How many characters does that give?
- 512
- 1,000
- 256
- 128
Order these by bits per character, fewest first.
Number these 1 to 3.
- Extended ASCII
- Unicode
- ASCII
Why must two computers use the same character set?
- So they run the same operating system
- So codes turn back into the same characters
- So they can share a printer
- So their files are the same size
Quiz Challenge, round 2: Quick Fire
Explain why computers need a character set. [2 marks]
A is 65 in ASCII. Calculate the ASCII code for the letter K and explain how you worked it out. [2 marks]
Give one advantage and one disadvantage of Unicode compared with ASCII. [2 marks]
In a program, "5" + "3" gives "53", but 5 + 3 gives 8. Explain why. [2 marks]
Quiz Challenge, round 3: Big Think
A website lets customers from around the world write reviews. Explain why it should store text in Unicode rather than ASCII. [4 marks]
Compare ASCII and Unicode. [6 marks]
This or That: tick the right answer
Which can store a Chinese character?
- Unicode
- ASCII
If Z is 90 in ASCII, what is Y?
- 91
- 89
Which uses fewer bits for the same English text?
- ASCII
- Unicode
What is the ASCII code for a space?
- 0
- 32
Lower case a is 97. Is upper case A higher or lower?
- Higher: it is 129
- Lower: it is 65
Is the character '7' the same as the number 7?
- Yes: both are stored as 7
- No: its ASCII code is 55
Did Unicode make old ASCII text unreadable?
- No: ASCII is its first 128 codes
- Yes: it changed every code
What must be agreed for a text message to arrive correctly?
- The screen size
- The character set
Memory Match: match each term to its meaning
| Term | Meaning |
|---|---|
| A ASCII | 1 8 bits, 256 characters |
| B Extended ASCII | 2 Characters with their unique binary codes |
| C Unicode | 3 Code 65 in ASCII |
| D Character set | 4 7 bits, 128 characters |
| E Character code | 5 16 or more bits, over a million characters |
F A | 6 The number given to one character |
Sort It: tick one box in each row
True of ASCII only, Unicode only, or both?
| Statement | ASCII only | Unicode only | Both |
|---|---|---|---|
| Covers English letters and basic symbols only | |||
| Stores A as code 65 | |||
| Makes files larger for the same English text | |||
| Can store emoji | |||
| Uses 7 bits per character | |||
| Can store Chinese, Arabic and Greek | |||
| Stores characters in order, so B is one more than A | |||
| Gives each character a unique binary code | |||
| Uses 16 or more bits per character | |||
| Has exactly 128 characters |
Answers
Round 1: Quiz Blitz
- A list of characters, each with a unique binary code Every character gets a number, and the number is stored in binary.
- 7 7 bits give 2 to the power 7 = 128 characters. Extended ASCII uses 8.
- 69 A 65, B 66, C 67, D 68, E 69. Count carefully: off by one is the classic slip.
- False The character '5' has ASCII code 53. That is why "5" + "3" gives "53".
- 128 7 bits give 128 codes. 256 is extended ASCII.
- It can represent almost every written language; It includes emoji and mathematical symbols Unicode covers over a million characters, but it uses more bits, so files are bigger.
- True So old ASCII text is still valid Unicode.
- Each character uses more bits 16 or more bits per character instead of 7 or 8.
- 100 a 97, b 98, c 99, d 100.
- 256 2 to the power 8 is 256.
- ASCII → Extended ASCII → Unicode 7 bits, then 8 bits, then 16 or more.
- So codes turn back into the same characters With different sets, every message would arrive as gibberish.
Round 2: Quick Fire
- Computers only store binary, so each character is given a unique code
- Devices must agree on the same set so text is shown correctly
Model answerComputers can only store binary, so each character is given a unique binary code. Devices must agree on the same character set, or text sent from one would be shown as gibberish on another.
- K is 75
- Letters are in order, and K is 10 letters after A
Model answerK is 75. Letters are stored in order, and K is 10 letters after A, so its code is 65 + 10 = 75.
- Advantage: far more characters, so almost every language and emoji
- Disadvantage: more bits per character, so larger files
Model answerAdvantage: Unicode can represent over a million characters, so it covers almost every written language. Disadvantage: it uses more bits per character, so text files are larger.
- The quoted values are characters or strings, not numbers
- So + joins them together: concatenation
Model answer"5" and "3" are strings of characters, not numbers, so + joins them together, which is concatenation, giving "53". Without the quotes they are numbers, so + adds them to give 8.
Round 3: Big Think
- ASCII uses 7 bits, so it only has 128 characters
- ASCII only covers English and basic symbols
- Unicode covers almost every written language, such as Chinese and Arabic
- Unicode also has emoji
- So names with accents are stored and displayed correctly
Model answerASCII uses 7 bits, so it only has 128 characters, which covers English and basic symbols only. Customers from around the world will write in many languages, such as Chinese, Arabic and Greek, and use accents in their names. Unicode can represent over a million characters, covering almost every written language and emoji too, so every review would be stored and displayed correctly.
- ASCII uses 7 bits per character
- ASCII has 128 characters
- Extended ASCII uses 8 bits for 256 characters
- Unicode uses 16 bits or more per character
- Unicode has over a million characters, covering almost every language
- Unicode files are larger for the same text
- The first 128 Unicode codes are the same as ASCII
Model answerASCII uses 7 bits per character, so it can represent 128 characters: English letters, digits, punctuation and control characters. Extended ASCII uses 8 bits for 256 characters. Unicode uses 16 bits or more per character, so it can represent over a million characters, covering almost every written language as well as emoji. The first 128 Unicode codes are the same as ASCII, so ASCII text is still valid. The drawback of Unicode is that it uses more bits per character, so the same text gives larger files that need more storage and bandwidth.
This or That
- Unicode ASCII's 128 characters cover English only. Unicode covers almost every writing system.
- 89 Y comes just before Z, so it is one less.
- ASCII ASCII needs 7 bits a character. Unicode needs 16 or more.
- 32 A space is a character too, with code 32.
- Lower: it is 65 Upper case letters come first in ASCII: A is 65 and a is 97.
- No: its ASCII code is 55 The digit characters start at 48 for '0', so '7' is 55.
- No: ASCII is its first 128 codes Unicode kept ASCII's codes, so ASCII text is still valid.
- The character set Both devices must turn the same codes into the same characters.
Memory Match
- A 4 ASCII: 7 bits, 128 characters
- B 1 Extended ASCII: 8 bits, 256 characters
- C 5 Unicode: 16 or more bits, over a million characters
- D 2 Character set: Characters with their unique binary codes
- E 6 Character code: The number given to one character
- F 3
A: Code 65 in ASCII
Sort It
- ASCII only Covers English letters and basic symbols only That is ASCII's big limit, and the reason Unicode was created.
- Both Stores A as code 65 Unicode's first 128 codes are the same as ASCII.
- Unicode only Makes files larger for the same English text More bits for every character means a bigger file.
- Unicode only Can store emoji Emoji are in Unicode, not ASCII.
- ASCII only Uses 7 bits per character Standard ASCII uses 7 bits. Unicode uses 16 or more.
- Unicode only Can store Chinese, Arabic and Greek Unicode covers almost every writing system.
- Both Stores characters in order, so B is one more than A Both keep letters in a logical order, which is why you can count on from A.
- Both Gives each character a unique binary code Every character set does that.
- Unicode only Uses 16 or more bits per character More bits per character is how Unicode fits so many in.
- ASCII only Has exactly 128 characters 2 to the power 7 is 128. Unicode has over a million.