ASCII and Unicode — AQA A-Level Computer Science
ASCII and Unicode are standard character encoding systems used to represent human text as binary data in computer systems. While standard 7-bit ASCII is restricted to 128 Western characters, Unicode provides a universal platform-independent standard that assigns unique code points across diverse global scripts and symbols.
ASCII and Unicode explained
ASCII and Unicode are character coding systems that assign a numerical code to each character so that text can be stored and processed by a computer.
Read the full explanation
ASCII, the American Standard Code for Information Interchange, uses 7 bits to give 128 codes, covering English letters, digits, punctuation and control characters; for example, 'A' is 65 (1000001) and 'a' is 97 (1100001). Because 128 codes cannot represent characters from other writing systems, Unicode was developed to provide a much larger code space for characters from many languages and symbols. Unicode assigns a code point to each character, and encodings such as UTF-8 store these code points in one to four bytes, with ASCII characters remaining at one byte. The reason for Unicode is that a single, universal system allows text in any language to be stored, exchanged and displayed consistently across different platforms.
Your focus
- Describe ASCII and Unicode coding systems for coding character data and explain why
Which command word is this?
Set out the causes, reasons, or mechanics clearly. For example, explain how UTF-8 preserves backwards compatibility with standard ASCII.
ASCII and Unicode exam tips
Topic Overview
ASCII and Unicode represent fundamental character encoding mechanisms in Computer Science, bridging human-readable text and machine-level binary storage. This topic covers the technical architecture of character sets, mapping numeric code points to abstract graphical glyphs across various hardware environments.
Understanding these standards is central to data representation, internationalisation, network transmission protocols, and file systems. Mastery of this area enables candidates to evaluate trade-offs between storage efficiency and linguistic inclusivity.
Key Concepts
- →Character Set vs Encoding: A character set maps symbols to numeric code points; an encoding scheme maps those numbers to binary bit patterns.
- →Standard ASCII: Uses 7 bits per character to represent 128 discrete codes (0-127), including control characters, punctuation, digits, and English alphabets.
- →Extended ASCII: Uses 8 bits per character yielding 256 unique codes (0-255), accommodating limited regional European accented characters.
- →Unicode Architecture: Universal standard supporting over 1.1 million code points across scripts, technical symbols, and emojis, avoiding proprietary code page conflicts.
- →UTF-8 Encoding: A backwards-compatible, variable-width encoding using 1 to 4 bytes per character, where the first 128 characters mirror 7-bit ASCII exactly.
Marking Points
- Describes ASCII as a coding system that assigns numerical codes to characters, using 7 bits for 128 characters.
- Gives a correct ASCII example, such as 'A' being 65 or 1000001 in binary.
- Describes Unicode as a coding system that assigns code points to characters from many languages and symbols.
- Explains that Unicode is needed because ASCII cannot represent characters from other writing systems.
- Explains that a single universal code allows text from different languages to be stored, exchanged and displayed consistently.
Examiner Tips
- 💡Give the number of characters ASCII supports and explain why this is a limitation.
- 💡When explaining why, link the need for Unicode directly to the limited range of ASCII.
- 💡Use a specific example such as 'A' to show how a character maps to a code.
- 💡Remember that the difference between upper and lower case letters in ASCII is always 32 in decimal (or bit 5 inverted: 00100000 in binary).
- 💡When explaining the migration from ASCII to Unicode, explicitly state that Unicode was created to overcome the limitation of ASCII's small character set to support non-Latin alphabets.
- 💡State file size overhead explicitly: switching from ASCII to a 16-bit encoding roughly doubles the text file size.
Common Mistakes
- States that ASCII can represent all characters used in modern text. Correction: ASCII supports only 128 characters, mainly English letters, digits, punctuation and control codes.
- Describes Unicode as simply a larger version of ASCII with the same character set. Correction: Unicode covers characters from many writing systems, and its first 128 code points match ASCII for compatibility.
- Gives a reason for Unicode without linking it to the limitations of ASCII. Correction: state that the 128 codes of ASCII are insufficient for other languages, which is why Unicode is needed.
- Thinking ASCII uses 8 bits natively: Standard ASCII specifies only 7 bits; the 8th bit in early architectures was reserved for parity checking or hardware extensions.
- Assuming Unicode is fixed at 16 bits: Unicode code points range up to 0x10FFFF and can be encoded using 8-bit (UTF-8), 16-bit (UTF-16), or 32-bit (UTF-32) systems.
- Believing emojis have their own isolated system: Emojis are standard Unicode code points managed directly within the universal character set.
Revision Plan
- 1Day 1-2: Master the exact specifications of 7-bit standard ASCII and 8-bit extended ASCII, practicing case-shift arithmetic.
- 2Day 3-4: Study the limitations of ASCII and learn the structure of Unicode, distinguishing code points from UTF-8 variable-length encodings.
- 3Day 5: Practice past paper calculation questions comparing storage requirements across ASCII, UTF-8, and UTF-16.
- 4Day 6-7: Complete structured comparison and evaluate questions under timed exam conditions.
Exam Question Types
- 📋Arithmetic Deduction: Given the binary or denary value of one character, calculate the binary code of another related character.
- 📋Comparative Analysis: Compare the trade-offs in storage, transmission speed, and universality between ASCII and Unicode encodings.
- 📋Data Representation Calculations: Calculate the precise storage requirements in bytes or kibibytes for text strings across various encodings.
Command Word Expectations (AQA)
Set out the causes, reasons, or mechanics clearly. For example, explain how UTF-8 preserves backwards compatibility with standard ASCII.
Identify both similarities and differences between two formats (e.g., ASCII vs Unicode), providing balanced technical points for both.
Perform mathematical conversions or storage size calculations, showing full working steps and explicit units.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: A text file contains 450 characters written entirely in standard ASCII. Calculate the minimum storage size of the file in bytes if each character is stored in an 8-bit byte. Then, calculate the size if the file is rewritten using UTF-16 where every character uses 2 bytes.
- 1.Step 1: In standard systems, 7-bit ASCII characters are padded to occupy 1 whole byte (8 bits) of memory each. 450 characters * 1 byte = 450 bytes.
- 2.Step 2: UTF-16 allocates a minimum of 16 bits (2 bytes) per character code unit.
- 3.Step 3: Multiply the total character count by the bytes per character: 450 characters * 2 bytes = 900 bytes.
Question: The character 'C' has an ASCII decimal value of 67. Deduce the 7-bit binary representation of the lowercase character 'g'.
- 1.Step 1: Calculate the decimal value of uppercase 'A': 'C' = 67, so 'B' = 66, and 'A' = 65.
- 2.Step 2: Determine lowercase 'a' by adding 32: 65 + 32 = 97.
- 3.Step 3: Find lowercase 'g', which is 6 positions after 'a': 97 + 6 = 103.
- 4.Step 4: Convert decimal 103 to 7-bit binary: 103 = 64 + 32 + 0 + 4 + 2 + 1 = 1100111.