ASCII, ISCII and Unicode Class 11: Encoding Text and Calculating Storage
Updated 17 October 2026 · Fact-checked
Encoding assigns a number (code) to every character. ASCII uses 7 bits for 128 characters (A is 65, a is 97, 0 is 48); ISCII is an 8-bit scheme for Indian scripts; Unicode gives a unique code to characters of almost all languages, stored with UTF-8 (1 to 4 bytes) or UTF-32 (4 bytes). In Python, ord() gives the code of a character and chr() gives the character of a code.
Each character becomes a number with ord(), and that number is stored as 7 binary bits in ASCII.
Illustration drawn for QuestionBuddy.
Understand ASCII, ISCII and Unicode: Encoding Text with Calculations
ASCII (American Standard Code for Information Interchange). 7-bit code, so 2 to the power 7 = 128 characters (control characters, digits, English letters, symbols). Useful codes: space 32, digits 0 to 9 are 48 to 57, capital letters A to Z are 65 to 90, small letters a to z are 97 to 122. A small letter is its capital + 32.
ISCII (Indian Script Code for Information Interchange). An 8-bit code (256 codes) developed to represent Indian scripts; the lower 128 codes are the same as ASCII.
Unicode. One universal code for characters of all major languages and symbols. Each character has a code point. Encodings:
- *UTF-8*: variable length, 1 to 4 bytes per character; English letters take 1 byte (same as ASCII), so it is compact for English text.
- *UTF-32*: fixed 4 bytes per character.
Encoding a word. Replace each character with its code. "Hi5" = H (72), i (105), 5 (53). In 7-bit binary: H = 1001000, i = 1101001, 5 = 0110101.
Storage. Number of characters x bits per character. A 25-character text uses 25 x 7 = 175 bits in 7-bit ASCII (usually stored as 25 bytes with 8 bits per character) and 25 x 4 = 100 bytes in UTF-32.
Python.
print(ord("A")) # 65
print(chr(97)) # a
print(chr(ord("A") + 2)) # Cord("A") is 65; chr(97) is "a"; chr(ord("A") + 2) is "C".
Why Unicode? ASCII has no code for Hindi, Tamil or other scripts, and different 8-bit schemes conflicted. Unicode avoids this with one code space for all.
ASCII, ISCII and Unicode: Encoding Text with Calculations: key facts
- ASCII
- 7 bits
- 128 characters
- A to Z: 65 to 90
- a to z: 97 to 122
- 0 to 9: 48 to 57
- Space: 32
- Small letter = capital + 32.
- ISCII and Unicode
ISCII 8 bits, Indian scripts Unicode unique code for all scripts UTF-8 1 to 4 bytes UTF-32 4 bytes - Unicode is the modern standard.
- Python functions
- ord(character) gives the code | chr(code) gives the character
- Only for single characters.
- Storage
- Characters x bits per character | Divide by 8 for bytes
- UTF-32: 4 bytes per character.
How to answer ASCII, ISCII and Unicode: Encoding Text with Calculations questions
Most questions are look-up and arithmetic; anchor on 65, 97 and 48.
- 1Find the code of the first character in the range (A 65, a 97, 0 48).
- 2Add the position to get the code of any other letter or digit.
- 3To get binary, divide the code by 2 repeatedly (7 bits for ASCII).
- 4For storage multiply the number of characters by the bytes per character.
- 5For Python, ord and chr are inverse of each other.
ASCII, ISCII and Unicode: Encoding Text with Calculations in real life
The idea, met in an everyday situation. Answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.
A text message
Suppose a message "Cat" is stored in ASCII.
Write the three codes.
Try it first, then show the solutionSolution
- C is 67 (A is 65, so C = 65 + 2).
- a is 97 and t is 116 (a + 19).
Answer: Codes: 67, 97, 116.
Memory hook: Count from A or a.
Tricks to remember ASCII, ISCII and Unicode: Encoding Text with Calculations
Short memory aids. Say each one aloud once, then use it on a question the same day.
A=65, a=97, 0=48
Three anchor values give the whole table.
Use it when: ASCII codes.
32 apart
A small letter code is the capital code plus 32.
Use it when: Case conversion.
ASCII, ISCII and Unicode: Encoding Text with Calculations: solved examples
Ordered from board level to HOTS. Try each one before you open the solution.
Example 1: ASCII bits · 1 mark · MCQBoard level
The number of bits used by ASCII to represent a character is:
(a) 4
(b) 7
(c) 16
(d) 32
Try it first, then show the solutionSolution
- ASCII is a 7-bit code.
Answer: (b) 7
Example 2: Encode a word · 3 marks · Short answerBoard level
Write the ASCII codes of the characters of "Hi5" and the 7-bit binary code of H. (3 marks)
Try it first, then show the solutionSolution
- H = 72, i = 105, 5 = 53.
- Binary of 72: 72 = 64 + 8 = 1001000.
- So the 7-bit code of H is 1001000.
Answer: Codes 72, 105, 53; H = 1001000.
Example 3: Python code · 3 marks · Short answerHarder board level
Trace this code and give the output:
print(ord("a") - ord("A"))
print(chr(ord("B") + 3))
print(ord("7") - ord("0"))(3 marks)
Try it first, then show the solutionSolution
- ord("a") is 97 and ord("A") is 65; difference 32.
- ord("B") is 66; 66 + 3 = 69, which is "E".
- ord("7") is 55 and ord("0") is 48; difference 7.
Answer: Output: 32, E, 7 (each on its own line).
Example 4: Storage in different schemes · 4 marks · Short answerHarder board level
A text of 25 characters is stored in (i) 7-bit ASCII; (ii) UTF-32. Find the number of bits in (i) and the number of bytes in (ii). Why is UTF-8 better than UTF-32 for English text? (4 marks)
Try it first, then show the solutionSolution
- (i) 25 x 7 = 175 bits.
- (ii) 25 x 4 = 100 bytes.
- UTF-8 uses only 1 byte for each English letter (the same as ASCII), so 25 bytes instead of 100.
- It saves storage for English text while still supporting every script.
Answer: 175 bits; 100 bytes; UTF-8 needs only 25 bytes for 25 English characters.
Example 5: Why Unicode · 4 marks · Short answerHOTS / competency
A Hindi message sent from a computer using an old 8-bit scheme appears as strange symbols on another computer. Explain why Unicode solves this, and why ISCII alone could not. (4 marks)
Try it first, then show the solutionSolution
- The two computers used different mappings of the 256 codes to characters, so the same numbers produced different symbols.
- Unicode gives every character a single unique code point, accepted worldwide.
- ISCII is limited to 8 bits for Indian scripts and cannot cover all other languages, nor does it prevent clashes with other schemes.
Answer: Unicode gives one unique code to each character; ISCII covers only Indian scripts.
Where students lose marks in ASCII, ISCII and Unicode: Encoding Text with Calculations
The slips examiners see most often, and what to write instead.
Mistake: Using 65 for small a
Mixing the two ranges.
Wrong working
ord("a") = 65.
Right working
ord("a") = 97.
Do this: Small letters start at 97.
Usually costs: 1 mark
Mistake: Calling Unicode a 16-bit code only
Ignoring UTF-8 and UTF-32.
Wrong working
Unicode is 16 bits.
Right working
Unicode has different encodings: UTF-8 (1 to 4 bytes), UTF-32 (4 bytes).
Do this: Name the encoding.
Usually costs: 1 mark
Mistake: Wrong bits for ASCII storage
Using 8 instead of 7.
Wrong working
25 characters = 200 bits in ASCII.
Right working
25 characters = 175 bits in 7-bit ASCII.
Do this: ASCII is a 7-bit code.
Usually costs: 1 mark
Exam tips
- Remember the three anchors: 48, 65, 97.
- Show the working for binary conversion by repeated division.
- Quote UTF-8 as 1 to 4 bytes and UTF-32 as 4 bytes.
- In Python tracing, write each ord and chr value.
Practice questions on ASCII, ISCII and Unicode: Encoding Text with Calculations
Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.
Q1 · 1 mark · MCQBoard level
The ASCII code of the character "A" is:
(a) 48
(b) 65
(c) 97
(d) 32Hint
Capital A.
Answer
(b) 65
Q2 · 3 marks · Short answerHarder board level
What is the output?
word = "Cat" for ch in word: print(ord(ch), end=" ")(3 marks)
Hint
C is 67.
Answer
ord("C") = 67, ord("a") = 97, ord("t") = 116. Output: 67 97 116 (with a space after each number).
Q3 · 3 marks · Short answerHarder board level
Convert the string "Hello" to the list of ASCII codes and find the number of bytes when stored in UTF-32. (3 marks)
Hint
H=72, e=101, l=108, o=111.
Answer
H = 72, e = 101, l = 108, l = 108, o = 111. UTF-32 uses 4 bytes per character: 5 x 4 = 20 bytes.
Q4 · 1 mark · Assertion-reasonHarder board level
Assertion (A): UTF-8 uses the same code as ASCII for English letters.
Reason (R): UTF-8 is a variable length encoding that stores English letters in 1 byte.
(a) Both A and R are true, and R is the correct explanation of A.
(b) Both A and R are true, but R is not the correct explanation of A.
(c) A is true, but R is false.
(d) A is false, but R is true.Hint
Backward compatibility.
Answer
(a) Both A and R are true, and R is the correct explanation of A.
Q5 · 4 marks · Short answerHOTS / competency
A teacher writes a program that converts a capital letter to a small letter using only chr and ord. Write the one-line expression, show it works for "G", and explain why it fails for a digit. (4 marks)
Hint
Add 32.
Answer
small = chr(ord(ch) + 32). For "G": ord = 71, 71 + 32 = 103, chr(103) = "g". For a digit like "5" (53), 53 + 32 = 85, which is "U": the rule works only for capital letters.
Test your recall
Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.
1.ASCII code of A?Show answer
65.
2.ASCII code of a?Show answer
97.
3.ASCII code of 0?Show answer
48.
4.Size of a character in UTF-32?Show answer
4 bytes.
5.Which function returns a character's code?Show answer
ord().
ASCII, ISCII and Unicode: Encoding Text with Calculations: frequently asked questions
Why is ASCII called a 7-bit code?
It uses 7 bits per character, giving 128 codes.
What does ISCII stand for?
Indian Script Code for Information Interchange.
Is Unicode a superset of ASCII?
Yes; its first codes match ASCII.