Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Course:
Topics:
AQA GCSE Computer Science (Paper 2) Smart practice A mixed round aimed at your weak spots
Unit 1
3.3 Fundamentals of data representation
Unit 2
3.4 Computer systems
Unit 3
3.5 Fundamentals of computer networks
Unit 4
3.6 Cyber security
Fundamentals of cyber security; cyber security threats
Cyber security, its threats and penetration testing
Methods to detect and prevent cyber security threats
Detecting and preventing cyber security threats
Unit 5
3.7 Relational databases and SQL
Unit 6
3.8 Ethical, legal and environmental impacts
Ethical, legal and environmental impacts
Ethical, legal and environmental impacts of technology
Avg
score:
–
Topics
done:
0/22

Character encoding: ASCII and Unicode

Practise 25 exam-style questions on Character encoding: ASCII and Unicode for AQA GCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with the Study Helper on hand if you get stuck.

  • 25 questions
  • 1–4 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

A web page is stored using Unicode. One of the symbols on the page is the hash sign '#', which has the code 35 in 7-bit ASCII.

What number does Unicode use to represent '#'? Give your answer in decimal.

Model answer

35

Explanation

Unicode uses the same codes as ASCII for the first 128 characters (codes 0 to 127), so every ASCII character has the same code in Unicode. '#' is code 35 in both. A common mistake is to think Unicode must use a different number.

Mark scheme
  1. 1 mark

    35

    Mark is for AO1 (understanding). R. a binary value (the question asks for decimal).

Question 2

2 marks

Describe the purpose of Unicode.

Model answer

Unicode is a character set designed to represent the characters of almost all of the world's written languages and alphabets, such as Arabic, Chinese and Greek, as well as special symbols such as mathematical symbols and emoji. Because it is a single international standard, text written on one device can be displayed correctly on another, anywhere in the world.

Explanation

ASCII was designed for English and has only 128 codes, so it cannot represent other alphabets or many symbols. Unicode's purpose is to give a unique code to a far greater range of characters, so that any written language can be stored. Answers that only say 'it has more characters' need to say what the extra characters are for.

Mark scheme
  1. 1 mark

    to represent the characters of (almost) all of the world's languages / alphabets // a far greater range of characters than ASCII

    All marks AO1 (understanding). Max 2. NE. 'it has more characters' without saying what the characters are for.

  2. 1 mark

    to represent special symbols, e.g. mathematical / scientific symbols or emoji

  3. 1 mark

    to be one international standard (character set), so text can be exchanged and displayed correctly on different devices / in different countries

Question 3

2 marks

A program sorts words by comparing the ASCII codes of their first characters, putting smaller codes first. When it sorts the words 'apple' and 'Zebra', it puts 'Zebra' first.

In ASCII, 'A' has the code 65 and 'a' has the code 97.

Explain why the program puts 'Zebra' before 'apple'.

Model answer

'Z' is 25 letters after 'A', so its code is 65 + 25 = 90. The code for 'a' is 97. The program puts smaller codes first, and 90 is smaller than 97, so 'Zebra' comes before 'apple'. In fact every capital letter (65 to 90) has a smaller code than every lower case letter (97 to 122).

Explanation

Computers compare characters by their codes, not by their place in the alphabet. Because the capital letters are grouped together with smaller codes than the lower case group, any word starting with a capital comes before any word starting with a lower case letter. Saying that 'a' comes before 'Z' in the alphabet does not explain the program's result.

Mark scheme
  1. 1 mark

    'Z' has the code 90 (65 + 25) // the capital letters have the codes 65 to 90

    All marks AO2 (apply).

  2. 1 mark

    which is smaller than 97, the code for 'a' // every capital letter has a smaller code than every lower case letter

    NE. 'capital letters come first' or 'Z is a capital letter' with no reference to the codes. Do not award both marks for a single statement such as 'capitals come before lower case'.

Question 4

3 marks

The table shows part of the ASCII table. Two of the values are shown as the letters P and Q.

State the values of P and Q, and state the character whose 7-bit ASCII code is 1010100.

Part of the ASCII table. Table with columns "Character", "Decimal code", "7-bit binary code". Character: H; Decimal code: 72; 7-bit binary code: 1001000 | Character: J; Decimal code: 74; 7-bit binary code: 1001010 | Character: N; Decimal code: P; 7-bit binary code: Q.

Model answer

N is 4 letters after J, so P = 74 + 4 = 78.
78 = 64 + 8 + 4 + 2, which is 1001110 in 7-bit binary, so Q = 1001110.
1010100 = 64 + 16 + 4 = 84, which is 10 more than the code for J (74). The 10th letter after J is T.

Explanation

Capital letters have consecutive codes, so you can count on from any letter whose code you know. The binary codes follow the same pattern: N's code 1001110 is J's code 1001010 plus 4 (100 in binary). The last part works backwards: convert 1010100 to decimal (84) and count on 10 letters from J.

Mark scheme
  1. 1 mark

    P = 78

    All marks AO2 (apply). Correct answer with no working scores full marks.

  2. 1 mark

    Q = 1001110

    Follow through: award for the correct 7-bit binary value of the student's own P. R. 01001110 (the table uses 7-bit codes).

  3. 1 mark

    T

    I. Quotation marks. R. t (lower case).

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

Study Helper Hints first, answers after you try

Stuck on this one? Ask for a hint and I’ll point you in the right direction, without giving the answer away. Once you’ve checked your answer, I’ll show you how the marks are awarded.