Skip to topic
    ← Back to course topics

    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.

    Read the Character encoding study guideFull revision notes for AQA GCSE Computer Science

    Your focus

    1. Identify the character represented by a given code in a stated character set.
    2. Explain that the decoded character depends on the character set used.
    3. 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
    1. 1Day 1: Learn the definitions of 'character set' and 'character encoding', contrasting ASCII with Extended ASCII.
    2. 2Day 2: Practice converting letters to binary values using character offsets (e.g., given 'A', calculate 'H').
    3. 3Day 3: Study Unicode specifications, focusing on the trade-offs between global character support, storage capacity, and transmission speeds.
    4. 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)
    Explain

    Set out the causes, reasons, or mechanisms clearly with connected points. For example, explain why Unicode was developed rather than relying solely on ASCII.

    Calculate

    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)
    Pitfall: Confusing the number of characters in a character set with the number of bits needed to represent each character.
    ❌ Weak Answer (Loses Marks):ASCII uses 128 bits to represent all letters and numbers.
    Example improved answer:Standard ASCII uses 7 bits per character, which allows it to represent 2 to the power of 7, or 128 unique characters.
    Examiner Tip: Always state both the bit length per character (e.g., 7 bits or 8 bits) and calculate the unique combinations using 2^n to secure full marks.
    Pitfall: Failing to explain the specific trade-off when migrating from ASCII to Unicode in real-world systems.
    ❌ Weak Answer (Loses Marks):Unicode is better because it has more languages and emojis, but it takes more space.
    Example improved answer:Unicode supports thousands of characters across multiple global alphabets and symbols by using up to 32 bits per character, whereas standard ASCII uses only 7 bits. However, text files encoded in Unicode require significantly more secondary storage and more bandwidth to transmit.
    Examiner Tip: Use precise technical terms such as 'storage capacity', 'bandwidth', and 'bit-depth' rather than vague words like 'space' or 'memory'.
    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. 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. 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. 3.Step 3: 70 = 64 + 4 + 2. Place a 1 in columns 64, 4, and 2, and 0 in all remaining columns: 01000110.
    Final Answer: 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. 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. 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. 3.Step 3: Calculate the difference in bytes: 2,400 bytes - 1,200 bytes = 1,200 bytes.
    Final Answer: 1,200 bytes larger when using 16-bit Unicode.
    Active Recall Memory Test
    How many unique characters can be represented by standard 7-bit ASCII?
    Key Fact: 128 characters (calculated as 2^7).
    What is the denary difference between the ASCII uppercase 'A' and lowercase 'a'?
    Key Fact: 32 (Uppercase 'A' is 65, and lowercase 'a' is 97).
    What is the primary drawback of using 16-bit or 32-bit Unicode over 8-bit ASCII for English text?
    Key Fact: It requires more storage space per character, leading to larger file sizes and increased network transmission times.
    Frequently Asked Questions
    What is the difference between ASCII and Extended ASCII?
    Standard ASCII uses 7 bits per character, providing 128 unique character codes sufficient for standard English letters, numbers, and basic punctuation. Extended ASCII uses an 8th bit, expanding the set to 256 unique characters (2^8). This extra space allows systems to support accented characters, symbols, and basic graphical shapes commonly used across Western European languages.
    Why does Unicode take up more storage space than ASCII?
    Unicode uses variable-length encoding typically requiring between 8 to 32 bits per character (most commonly 16 bits in basic implementations) compared to standard ASCII's 7 or 8 bits. Because each character requires more bits to store its unique identifier, a text file encoded entirely in 16-bit Unicode can take up to twice as much secondary storage space as the same text in 8-bit ASCII.
    How are lowercase and uppercase letters related in ASCII?
    In ASCII, lowercase letters are assigned codes exactly 32 values higher than their uppercase equivalents. For example, uppercase 'A' is represented by denary 65 (binary 01000001), while lowercase 'a' is 97 (binary 01100001). In binary, this offset corresponds directly to toggling bit 5 (the 6th bit from the right), allowing software to convert letter cases rapidly with a single bitwise operation.
    Does Unicode replace ASCII completely in modern systems?
    No, Unicode does not replace ASCII; rather, it incorporates it. The first 128 code points of Unicode (such as in UTF-8) are deliberately identical to standard 7-bit ASCII. This backwards compatibility ensures that legacy files, programming code, and older protocols continue to render and function correctly without modification.