Text, encoded.

Six original Cambridge-style questions on character sets and character codes, with worked solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

One code per character.

01
Explain
[2 marks]

Explain what is meant by a character set.

  • The set of all the characters that a computer can represent / recognise. ✓
  • Each character is given a unique binary code. ✓
02
Apply
[2 marks]

The ASCII code for 'M' is 77. Give the 8-bit binary codes for 'P' and for 'm'.

  • 'P' = 80 = 01010000. ✓
  • 'm' = 77 + 32 = 109 = 01101101. ✓
03
Apply
[3 marks]

The code for the character '0' is 48. (a) Give the 8-bit code for the character '5'. (b) Explain why this is different from storing the integer 5.

  • (a) 48 + 5 = 53 = 00110101. ✓
  • (b) The integer 5 is stored as 00000101. ✓
  • The character code represents a symbol for display; it must be converted before it can be used in calculations. ✓
04
Calculate
[3 marks]

A document contains 6000 characters. Calculate the storage needed in KiB if it is stored (a) in extended ASCII and (b) in a Unicode encoding using 4 bytes per character.

  • (a) 6000 bytes ÷ 1024 = 5.86 KiB (2 d.p.). ✓
  • (b) 6000 × 4 = 24 000 bytes. ✓
  • 24 000 ÷ 1024 = 23.44 KiB (2 d.p.). ✓
05
Explain
[3 marks]

Describe the differences between ASCII and Unicode.

  • ASCII uses 7 bits per character; Unicode uses up to 32 bits (e.g. 16 or 32). ✓
  • ASCII represents only 128 characters (English letters, digits, punctuation); Unicode represents characters from all languages and emoji. ✓
  • Unicode text can take more storage; the first 128 Unicode codes are the same as ASCII. ✓
06
Analysis
[2 marks]

A company changes its customer database from extended ASCII to a Unicode encoding. Give one benefit and one drawback of the change.

  • Benefit: names and addresses in any language (e.g. Arabic, Chinese) can be stored correctly. ✓
  • Drawback: more bits per character, so the database needs more storage and takes longer to transmit. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.