ASCII — 128 Characters, 7 Bits
When you press the key A, the computer does not store a picture of the letter. It stores a number, and every program on the machine agrees which number means A. The first widely adopted agreement, from the 1960s, is ASCII, and it still sits underneath almost all text today.
The rule
ASCII gives 128 characters the numbers 0 to 127: seven bits each.
ASCII (American Standard Code for Information Interchange) covers:
- 0–31 and 127: invisible control characters, such as newline (10), carriage return (13) and tab (9).
- 32: the space.
- 48–57: the digits
0–9. - 65–90: capitals
A–Z. - 97–122: lowercase
a–z. - The gaps hold punctuation and symbols, like
!(33) and@(64).
Since 127 is the biggest code, 7 bits are enough; in practice each character is stored in a full byte with the top bit 0.
Notice the character '7' is not the number 7. It is code 55. Text that looks like a number must be converted before you can do arithmetic with it.
ASCII has no é, no ñ, no ₹ and nothing from Hindi, Chinese or Arabic. That limit is why Unicode exists, which is the next lesson.