AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Character encoding: convert characters to character codes

    Character encoding gives each character a unique numeric code so a computer can store and process text.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 3 of 10

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    Character encoding gives each character a unique numeric code so a computer can store and process text. To convert a character to its code, identify the character set in use (for example ASCII or Unicode), then look up the numeric value assigned to that character. For instance, in ASCII the capital letter A is stored as the decimal value 65, and the lowercase a is 97. The same character may have different codes in different character sets, so the set must be stated. A reliable method is: take the character, find it in the relevant code table, and record the decimal (or binary/hex) value. This skill underpins how text files, strings and keyboard input are represented in memory.

    What earns the marks

    • Identifies that each character is mapped to a unique numeric code by a character set such as ASCII or Unicode.
    • States the correct code for a named character in a stated character set, e.g. A is 65 in ASCII.
    • Recognises that the code depends on which character set is being used.
    • Records the value in the required base (decimal, binary or hexadecimal) accurately.
    • Explains that the code is what the computer stores for that character.

    Common mistakes and how to put them right

    • Assuming every character set gives the same code.

      Put it right: Is that codes depend on the character set, so ASCII and Unicode values must be checked separately.

    • Confusing the code for uppercase and lowercase letters.

      Put it right: Is that in ASCII uppercase A is 65 while lowercase a is 97.

    • Giving a code without stating the character set.

      Put it right: Is to always name the character set so the value is unambiguous.

    Exam tips

    • Always state which character set you are using before giving a code.
    • Learn a few anchor values (such as A = 65 and a = 97 in ASCII) to check your answers.
    • If asked for binary or hexadecimal, convert carefully and show the base clearly.

    Try the lesson

    The start of the Character encoding: convert characters to character codes lesson, made from checked teaching notes for this specification point.

    Have a go first

    A character encoding table gives the digit 0 the code 48, the digit 1 the code 49 and the digit 2 the code 50. Using the same pattern, what is the code for the digit 5?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Character encoding: convert characters to character codes

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge