Text is represented in binary using a character encoding system — a standard that assigns a unique binary code to every character (letters, digits, punctuation, symbols). Each character has a unique code point (numeric value).
ASCII (American Standard Code for Information Interchange) uses 7 bits to represent each character, giving 2⁷ = 128 possible characters (code points 0–127). An extended 8-bit version adds a further 128 characters (code points 128–255).
| Character | ASCII Code (denary) | Binary |
|---|---|---|
| 'A' | 65 | 1000001 |
| 'B' | 66 | 1000010 |
| 'a' | 97 | 1100001 |
| '0' | 48 | 0110000 |
| ' ' (space) | 32 | 0100000 |
Note: uppercase letters have smaller code values than lowercase. 'A'=65, 'Z'=90, 'a'=97, 'z'=122.
Unicode is a universal character encoding standard designed to represent every character in every language in the world. It includes over 1 million possible code points.
Common Unicode encoding formats:
| Feature | ASCII | Unicode (UTF-8) |
|---|---|---|
| Bits per character | 7 (or 8 extended) | 8–32 (variable) |
| Number of characters | 128 (or 256) | Over 1 million |
| Languages supported | English primarily | All world languages |
| File size | Smaller (1 byte per char) | Larger (variable bytes) |
| Backward compatible? | — | Yes (first 128 = ASCII) |