Theory
The journey of the letter A
You type A in a WhatsApp message at the shop counter and hit send.
But wires, chips and radio waves carry only the 1s and 0s you have been studying, no letters, no shapes. Somewhere between your keypress and your friend's screen, A must become a number, travel as bits, and turn back into A.
The dictionary that makes this possible is ASCII, and its three or four key entries are worth guaranteed exam marks.
Theory
A public roll-call list
Imagine every character in existence standing in one agreed line, each holding a roll number: A holds 65, B holds 66, the digit character 5 holds 53, even the invisible space holds 32. Every computer on Earth carries the SAME list, so number 65 sent from Surat is unmistakably A in São Paulo. An encoding is nothing more than this shared roll-call.
Theory
ASCII, formally
ASCII (American Standard Code for Information Interchange) is a 7-bit code: 2⁷ = 128 characters, covering English letters, digits, punctuation and control characters (invisible actions like Enter and Backspace).
ANSI extended it to 8 bits = 256 characters, using the extra 128 slots for regional letters and symbols (é, ñ, ₹-like symbols in various code pages).
The codes are just numbers, so they store and travel as the binary you learned: A = 65 = 1000001.
At a glance
The codes worth memorising
| Character | Code | Remember it by |
|---|---|---|
| A to Z | 65 to 90 | A = 65, the anchor |
| a to z | 97 to 122 | capital + 32 |
| 0 to 9 | 48 to 57 | '0' = 48, not 0 |
| space | 32 | invisible but real |
| Enter (CR) | 13 | a control character |
Quiz
A = 65 and a = 97. Without a table, what is the ASCII code of the letter d?
- 100
- 68
- 97
- 104
Show the answer
100
d is the 4th lowercase letter: 97 + 3 = 100. Option B (68) is capital D, the +32 rule connecting the two cases: D = 68, d = 68 + 32 = 100. Exams rarely ask codes beyond the anchors; they test whether you can walk from an anchor, exactly like this.
Think first
The '5' that is not 5
The character '5' on your keyboard has ASCII code 53. The number 5 in arithmetic is just 5. Why does the machine keep them separate at all? Think of a phone number.
Show the answer
A phone number like 98765... is text made of digit characters, you never add or multiply it. The character '5' (stored as 53) is a symbol for display; the number 5 is a value for arithmetic. Confusing them is why beginner C programs print garbage: this exact distinction returns with force in BCA104, where '5' and 5 are famously different things.
Watch out
Where marks leak
Writing that '0' has code 0: the character '0' is 48; code 0 is the NUL control character. Mixing the case anchors: capital A = 65, small a = 97, and the gap is exactly 32. And ASCII is 7-bit/128 characters; the 8-bit/256 figure belongs to ANSI (and extended ASCII), a distinction examiners check with one-mark questions.
Theory
Beyond English: the bigger list
128 or even 256 slots cannot hold ગુજરાતી, हिंदी, tamil, emoji... The modern answer is Unicode, the same roll-call idea scaled to over a lakh characters, with ASCII kept as its first 128 entries. So ASCII never died; it became page one of the world's character dictionary. When Gri-Learn shows you Gujarati, Unicode is doing it.
Summary
Key takeaways
- Encodings map characters to numbers so text can live in binary machines.
- ASCII: 7 bits, 128 characters; ANSI extends to 8 bits, 256.
- Anchors: A=65, a=97 (gap 32), '0'=48, space=32, Enter=13.
- The character '5' (code 53) is not the number 5.
- Unicode extends the same idea to all world scripts, keeping ASCII as its start.
- Memory hook: a public roll-call, A holds 65.