Character encoding — AQA GCSE Computer Science
Verified courseTeaching note checked against the official specification.
Character encoding maps human-readable characters to unique binary codes so digital systems can process and store text data effectively. In AQA GCSE Computer Science, students must master standard 7-bit ASCII, Extended ASCII, and Unicode, understanding their trade-offs in character capacity versus file size.
Character encoding explained
Converting a character code back to a character is the reverse of encoding: the computer takes a stored numeric value and looks it up in the character set to find which character it represents.
Read the full explanation
To do this, identify the character set in use (for example ASCII or Unicode), then find the given code in that set's table and read off the matching character. For instance, in ASCII the decimal value 65 maps to the capital letter A, and 97 maps to lowercase a. The same numeric value can map to different characters in different character sets, so the set must be known. A reliable method is: take the code, confirm the character set, locate the value in the table, and record the character. This skill explains how stored text is turned back into readable characters.
Your focus
- Identify the character represented by a given code in a stated character set.
- Explain that the decoded character depends on the character set used.
- Convert codes given in decimal, binary or hexadecimal into the correct character.
Character encoding exam tips
Topic Overview
Character encoding defines the standardized translation layer between binary signals and human-readable text. Because digital systems exclusively manipulate binary digits (0s and 1s), each character must correspond to a distinct numeric code within a defined character set.
This topic covers standard ASCII, Extended ASCII, and modern Unicode variations. Mastering these concepts is fundamental to understanding data representation, text processing algorithms, storage limitations, and network transmission overheads in Computer Science.
Key Concepts
- →Character set: A defined list of characters recognized by computer hardware and software, where each individual character corresponds to a unique binary code.
- →ASCII (American Standard Code for Information Interchange): A 7-bit character set representing 128 characters, covering the English alphabet, digits, punctuation marks, and control codes.
- →Extended ASCII: An 8-bit character set that represents 256 characters (2^8), adding European accented letters and graphical symbols.
- →Unicode: A comprehensive character encoding standard utilizing between 8 and 32 bits, capable of representing over 1.1 million distinct characters across global languages, mathematical symbols, and emojis.
Marking Points
- Identifies that a character code is looked up in a character set to find the matching character.
- States the correct character for a given code in a stated character set, e.g. 65 is A in ASCII.
- Recognises that the resulting character depends on which character set is used.
- Handles codes given in decimal, binary or hexadecimal by converting to the table value first.
- Explains that decoding reverses the encoding process to recover readable text.
Examiner Tips
- 💡State the character set before naming the character for a code.
- 💡Convert binary or hexadecimal codes to decimal first if that helps you use the table.
- 💡Use anchor values such as 65 = A and 97 = a in ASCII to check your answer.
- 💡Always check whether an exam question asks for your final answer in bits or bytes. Leaving your answer as bits when bytes are requested loses an easy mark.
- 💡Memorize the case conversion rule: in ASCII, lowercase letters are located 32 positions above their uppercase counterparts (e.g., 'A' = 65, 'a' = 97).
- 💡Show all intermediate working for offset character calculations, including your denary subtraction/addition and binary conversion tables.
Common Mistakes
- Assuming a code always gives the same character regardless of character set: correction is that the character set must be known because the same value can map differently.
- Mixing up uppercase and lowercase results: correction is that in ASCII 65 is uppercase A while 97 is lowercase a.
- Failing to convert binary or hexadecimal codes to the table value before lookup: correction is to convert to the matching base first, then find the character.
- Believing that numbers stored as characters have the same binary values as raw integers. In ASCII, the numeral '0' has a denary value of 48 (binary 00110000), not zero.
- Assuming Unicode completely replaces ASCII with an entirely different mapping. Unicode was deliberately designed so that its first 128 codes match standard ASCII identically for backwards compatibility.
- Confusing bits and bytes when calculating character set sizes. A 7-bit set yields 128 unique combinations, not 7 or 14 characters.
Revision Plan
- 1Day 1: Learn the definitions of 'character set' and 'character encoding', contrasting ASCII with Extended ASCII.
- 2Day 2: Practice converting letters to binary values using character offsets (e.g., given 'A', calculate 'H').
- 3Day 3: Study Unicode specifications, focusing on the trade-offs between global character support, storage capacity, and transmission speeds.
- 4Day 4: Complete past paper calculation questions involving document storage sizes across 7-bit, 8-bit, and 16-bit encodings.
Exam Question Types
- 📋Offset calculation questions: Finding the binary or denary value of an unknown character given the code of a known base character.
- 📋Comparative short-answer questions: Stating distinct advantages and disadvantages of Unicode compared to ASCII.
- 📋Storage requirement calculations: Calculating file sizes of given text passages across different bit-depths.
Command Word Expectations (AQA)
Set out the causes, reasons, or mechanisms clearly with connected points. For example, explain why Unicode was developed rather than relying solely on ASCII.
Perform mathematical operations to obtain a numerical answer, always showing working out and including appropriate units such as bits or bytes.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: The ASCII code for the uppercase character 'B' is stored in denary as 66. Determine the binary representation of the uppercase character 'F' as an 8-bit binary number.
- 1.Step 1: Determine the alphabetical offset between 'B' and 'F'. Counting forwards: C (67), D (68), E (69), F (70). The denary value for 'F' is 70.
- 2.Step 2: Convert the denary value 70 into an 8-bit binary number using place values (128, 64, 32, 16, 8, 4, 2, 1).
- 3.Step 3: 70 = 64 + 4 + 2. Place a 1 in columns 64, 4, and 2, and 0 in all remaining columns: 01000110.
Question: A document contains 1,200 characters. Calculate the difference in file size in bytes between encoding this document using 8-bit Extended ASCII versus 16-bit Unicode. Show your working.
- 1.Step 1: Calculate the total bits for 8-bit Extended ASCII. 1,200 characters * 8 bits = 9,600 bits. Convert to bytes: 9,600 / 8 = 1,200 bytes.
- 2.Step 2: Calculate the total bits for 16-bit Unicode. 1,200 characters * 16 bits = 19,200 bits. Convert to bytes: 19,200 / 8 = 2,400 bytes.
- 3.Step 3: Calculate the difference in bytes: 2,400 bytes - 1,200 bytes = 1,200 bytes.