A stored code is not a picture of a letter
A character is a letter, digit, punctuation mark, symbol or control item. A character set assigns codes to its supported characters. The computer stores the code as bits; display software uses that code and a font to draw the visible shape, called a glyph.
Suppose the supplied table assigns A the decimal code 65. Encoding finds A's code and stores its binary representation. Decoding uses the agreed mapping in the opposite direction: code 65 identifies A. Changing A's font or visual width does not change its character code.
| Character | Supplied decimal code |
|---|---|
| A | 65 |
| B | 66 |
| C | 67 |
| D | 68 |
AQA focus
AQA: seven-bit ASCII and shared Unicode codes
AQA specifies 7-bit ASCII. Seven bit positions give 2⁷ = 128 patterns, numbered 0 to 127. In the supplied example, decimal 65 is 1000001 in seven bits. That means seven bits for the code, not 128 bits per character.
Unicode keeps the same character codes as ASCII from 0 to 127 and adds a much wider repertoire for different alphabets and special symbols. The code for A remains 65. The purpose is to represent more kinds of characters using an agreed mapping, not to guarantee that every text file becomes smaller.
OCR's exam display convention uses eight bits for ASCII. For AQA's seven-bit ASCII questions, use the seven-bit convention described here. Detailed UTF encoding methods are not required by this specification, and Unicode should not be described as one fixed number of bytes for every character.
OCR focus
OCR: show ASCII codes using eight bits
OCR says the binary representation of ASCII in its exam will use eight bits. For decimal 65, write 01000001: the leading zero makes eight displayed positions without changing the value. This is a presentation convention, not a claim that standard seven-bit ASCII has 256 assigned characters.
A general eight-bit code has 2⁸ = 256 possible patterns. Increasing the number of bit positions makes more distinct patterns available. Keep the number of possible codes separate from the bits used by one code: 256 patterns does not mean 256 bits per character.
Unicode provides a much wider repertoire than ASCII, so it can represent many more writing systems and symbols. OCR does not require memorisation of character-set codes. Use the supplied code or table when calculating another character's code.
Follow the sequence inside the stated group
Character codes are commonly ordered in groups. In the supplied uppercase-letter table, B follows A, so its code is one greater: 66. D is three places after A, so 65 + 3 = 68. You can also work backwards: code 67 is two places after 65, so it identifies C.
Do not assume every character group joins directly to the next. Uppercase letters, lowercase letters and digits have their own ranges. A digit character also has a code distinct from its numeric value: if a supplied table says the character '0' has code 48, the character '3' has code 51, not the numeric value 3.
Continue with your exam board
The course combines lesson videos, interactive activities, topic questions and original exam mocks. Sign in to use the learning tools and save your progress; your account’s course access applies.
Independent learning resources. Not endorsed by AQA or OCR. These public introductions complement the full course and the official specification.