lesson

Updated 6 days ago ยท 1 view
Every time you type a message, hit a key, or send an emoji, your computer stores and transmits only zeros and ones. But how does a stream of electrical pulses turn into the letter 'A' or a smiling face?
To bridge this gap, computers use a character set, which is an agreed lookup table where every symbol is assigned a unique numeric code called a code point.
๐Interactive diagram
What happens when computers from different manufacturers need to share the same text files without garbling the words?
Standard ASCII and Extended ASCII
In 1963, computer scientist Bob Bemer helped create ASCII (American Standard Code for Information Interchange) to standardize communication between different teletypewriter systems. Standard ASCII uses 7 bits per character, which provides 27=128 distinct combinations ranging from 0 to 127.
Because computer architectures group memory into 8-bit bytes, the 8th bit in standard ASCII was often used as a parity bit for error checking or simply left as 0. Later, Extended ASCII claimed all 8 bits, expanding the range to 28=256 characters (0 to 255) to support accented letters, currency symbols, and box-drawing lines.
๐Interactive diagram
Extended ASCII worked well for Western Europe, but what happens when you need to represent Chinese, Arabic, Japanese, or thousands of modern emojis in a single document?
The Global Standard: Unicode
Because 256 slots could never fit all the world's writing systems, the Unicode Consortium introduced Unicode, an international standard designed to assign a unique code point to every character in human history. Unicode defines over 1.1 million possible code points across 17 planes, written in hexadecimal notation like U+0041 for 'A' or U+1F600 for '๐'.
To store these code points efficiently, we use UTF-8 (8-bit Unicode Transformation Format), a variable-length encoding system that uses between 1 and 4 bytes per character. UTF-8 was deliberately engineered to be fully backward-compatible with ASCII: code points 0 through 127 are stored as identical single bytes.
๐Interactive diagram