A character encoding associates symbols with numeric codes. ASCII defines 128 codes, so its basic codes fit in seven bits. Unicode covers many more characters; UTF-8 represents Unicode values using sequences of bytes, with ordinary ASCII characters retaining their familiar one-byte values.
Worked example
The ASCII code for uppercase A is decimal 65, hexadecimal 41, or binary 1000001. In an eight-bit byte it is 01000001. Lowercase a is decimal 97, so uppercase and lowercase letters are distinct encoded symbols.
What to watch for
A character is not necessarily one byte. This matters when counting text length, storing messages or building a serial interface that receives encoded bytes.
Try it yourself
What eight-bit binary value represents ASCII B, whose code is 66?
Answer: 66 = 64 + 2, so the byte is 01000010. It follows A numerically in the ASCII alphabet.
How to study this topic
Treat a code as a mapping with an explicit convention. Write the input, encoded bits and decoded result side by side. For error-checking examples, distinguish detecting an error from locating and correcting it.
Explore related programmes
These recorded programmes are upcoming. This article is general educational content, not a syllabus or course sample.
Digital Electronics