Skip to content
Computer ScienceISC Class 11 · Chapter 2

Encodings: ASCII, ISCII and Unicode for ISC Class 11

Updated 15 October 2026 · Fact-checked

A character encoding assigns a unique number to each character so that text can be stored as bits. ISC Class 11 Computer Science covers ASCII, ISCII and Unicode, why 7-bit ASCII cannot represent Indian and other scripts, how Unicode represents local languages, how Java's Unicode strings handle them, and simple table lookup.

What Encodings is about

Inside a computer, the letter 'A' is just the number 65, and the Hindi letter 'क' is the number 2325. The rule that links characters to numbers is a character encoding.

The CISCE 2028 syllabus (Section A, topic 2) asks for: characters and their encodings (ASCII, ISCII, Unicode); the limitations of ASCII in representing characters of other languages; Unicode representation for the local language; the fact that Java uses Unicode, so strings in the local language can be used; and a simple table lookup for local-language equivalents of Latin character strings.

Two Java programs on this page (compiled and run) print character codes, including Devanagari letters, and use a lookup table to convert digits and words into Hindi. Byte counts for different encodings are computed and checked.

Weightage: Encodings is topic 2 of the ISC Class XI Computer Science syllabus, in Section A - Hardware. CISCE weights Section A at 25 of the 70 marks in Paper I (Theory). Class XI is examined by the school, so your school sets the paper within this weightage.Source: CISCE ISC Computer Science syllabus, examination year 2028, Class XI unit weightage

Key concepts

What a character encoding is

A character set is a collection of characters (letters, digits, punctuation, symbols, control characters). A character encoding assigns each character a unique number (code) and specifies how that number is stored in bits and bytes.

Why it is needed: computers store only binary numbers. When you type 'A', the keyboard sends a code; the program stores 01000001; the screen looks up the code and draws 'A'. If the sender and receiver use different encodings, text appears garbled (strange symbols or question marks).

Number of characters vs bits: with n bits, 2ⁿ different codes are possible.

BitsCodes
7128
8256
1665,536

Control characters (non-printing) include line feed (10), carriage return (13) and tab (9).

Worked example

How many bits are needed at minimum to give a unique code to each of 26 capital letters, 26 small letters, 10 digits and 30 symbols? [1 mark]

Try it first, then show the solutionSolution
  1. Total = 26 + 26 + 10 + 30 = 92 characters; 2⁶ = 64 < 92 ≤ 128 = 2⁷.

Answer: 7 bits.

ASCII and its limitations

ASCII (American Standard Code for Information Interchange) is a 7-bit code with 128 characters (codes 0-127):

RangeCharacters
0-31, 127Control characters (tab 9, line feed 10, carriage return 13)
32Space
48-57Digits '0'-'9'
65-90Capital letters 'A'-'Z'
97-122Small letters 'a'-'z'

Useful patterns: a small letter's code = capital letter's code + 32; the digit d has code 48 + d.

Extended ASCII uses 8 bits (256 codes); codes 128-255 differ between vendors and regions, which caused incompatibility.

Limitations of ASCII:

1. Only 128 characters: enough for English, not for other languages.
2. Cannot represent Indian scripts (Devanagari, Bengali, Tamil and others), Chinese, Japanese, Arabic, or accented European letters.
3. Extended 8-bit versions are not standard: the same code means different characters in different code pages.
4. No mixing of scripts in one document reliably.
5. No mathematical and other special symbols beyond a few.

Worked example

The ASCII code of 'G' is 71. Find the codes of 'g' and 'J'. [1 mark]

Try it first, then show the solutionSolution
  1. 'g' = 71 + 32 = 103; 'J' is three letters after 'G': 71 + 3 = 74.

Answer: 'g' = 103; 'J' = 74.

ISCII: Indian Script Code for Information Interchange

ISCII is an 8-bit encoding standardised by the Bureau of Indian Standards (IS 13194:1991) for Indian scripts.

Features:

1. Codes 0-127 are the same as ASCII, so English text still works.
2. Codes 128-255 represent the letters of Indian scripts (vowels, consonants, matras, halant).
3. Because the Brahmi-derived Indian scripts share a common structure, one code table serves many scripts (Devanagari, Bengali, Gurmukhi, Gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam); a special script-switching code selects which script to display.
4. Supports transliteration: the same text can be displayed in another Indian script by changing the script.

Limitations: only one Indian script at a time without switching codes; not widely supported by international software; largely replaced by Unicode, whose Indian-script blocks were based on ISCII's layout.

Worked example

Why can an ISCII file show both English and Hindi text? [1 mark]

Try it first, then show the solutionSolution
  1. ISCII keeps codes 0-127 identical to ASCII and uses 128-255 for Indian-script letters.

Answer: Because its lower half is ASCII (English) and its upper half holds Indian-script characters.

Unicode: one code for every character

Unicode is a universal standard that gives every character of every writing system a unique number called a code point, written U+ followed by hexadecimal digits (U+0041 = 'A'; U+0915 = 'क').

Features:

1. Covers almost all the world's scripts, plus symbols, mathematical signs and emoji.
2. The code space runs from U+0000 to U+10FFFF: 17 planes of 65,536 code points = 1,114,112 possible code points.
3. First 128 code points = ASCII, so ASCII text is valid Unicode.
4. Scripts are arranged in blocks: Devanagari U+0900-U+097F, Bengali U+0980-U+09FF, Tamil U+0B80-U+0BFF, and so on. The Devanagari digits are U+0966 (०) to U+096F (९).
5. Encoding forms store code points as bytes: UTF-8 (1 to 4 bytes per character; ASCII characters take 1 byte, Devanagari letters 3 bytes); UTF-16 (2 bytes for most characters, 4 for rare ones); UTF-32 (4 bytes each).

Unicode for the local language: a Hindi word such as कमल is stored as the code points U+0915 (क), U+092E (म), U+0932 (ल). Matras and the halant are separate code points that combine with consonants when displayed.

Advantages over ASCII and ISCII: many scripts in the same document; one standard worldwide; supported by all modern operating systems, browsers and languages.

Worked example

Suppose the word 'Namaste' (7 Latin letters) and a 6-character Devanagari word are stored in UTF-8. How many bytes does each take? [2 marks]

Try it first, then show the solutionSolution
  1. Latin letters are ASCII: 1 byte each in UTF-8 → 7 bytes.
  2. Devanagari characters take 3 bytes each in UTF-8 → 6 × 3 = 18 bytes.

Answer: 7 bytes and 18 bytes.

Java uses Unicode: characters and strings in the local language

In Java, the char type is a 16-bit Unicode (UTF-16) value, and String is a sequence of chars. So Java programs can store and process text in Hindi, Tamil or any script.

Key points:

1. A char can be written directly ('क') or as a Unicode escape '\u0915'.
2. Casting a char to int gives its code: (int) 'A' is 65.
3. Arithmetic on chars works on codes: (char) ('A' + 2) is 'C'.
4. String methods (length, charAt, indexOf, equals) work for any script.
5. Source files should be saved as UTF-8 and compiled with that encoding (javac -encoding UTF-8) when they contain non-ASCII letters.

The program below prints the codes of Latin characters and of the Hindi word कमल, typed directly in the UTF-8 source file (compile with javac -encoding UTF-8).

// Shows the numeric codes Java stores for characters: ASCII letters and Devanagari letters.
public class CharCodes
{
    public static void main(String[] args)
    {
        String latin = "Cab9";
        for (int i = 0; i < latin.length(); i++)
        {
            char c = latin.charAt(i);
            System.out.println(c + " -> " + (int) c);
        }
        char a = 'A';
        char next = (char) (a + 2);                 // arithmetic on codes
        System.out.println("'A' + 2 = " + next);
        System.out.println("'a' - 'A' = " + ('a' - 'A'));

        String hindi = "कमल";        // the word kamal in Devanagari
        System.out.println(hindi + " has " + hindi.length() + " chars");
        for (int i = 0; i < hindi.length(); i++)
        {
            int code = hindi.charAt(i);
            System.out.println("U+" + Integer.toHexString(code).toUpperCase() + " = " + code);
        }
    }
}

Output:

C -> 67
a -> 97
b -> 98
9 -> 57
'A' + 2 = C
'a' - 'A' = 32
कमल has 3 chars
U+915 = 2325
U+92E = 2350
U+932 = 2354

Note that each Devanagari letter is one char in Java, and its code (for example 2325 = 0x915) falls in the Devanagari block.

Worked example

What does System.out.println((char) ('k' - 32)); print, and why? [1 mark]

Try it first, then show the solutionSolution
  1. 'k' has code 107; 107 − 32 = 75, which is 'K'.

Answer: K, because small and capital letters differ by 32 in ASCII and Unicode.

Table lookup for local-language equivalents

A table lookup converts Latin strings to local-language equivalents by searching a stored table.

Two techniques:

1. Parallel arrays (or a 2-D table): english[i] and hindi[i] hold matching words. Search english for the input; return hindi at the same index; if not found, return a message.
2. Code offset: when a script's characters are arranged in the same order as the Latin ones, a fixed offset converts them. Devanagari digits start at U+0966, so digit d becomes (char) ('\u0966' + d).

Algorithm (parallel arrays):

for i = 0 to n - 1
    if english[i] equals word (ignoring case)
        return hindi[i]
return "not found"

The program below converts digits by offset and day names by parallel arrays.

// Table lookup: converts Latin digits in a string to Devanagari digits, and English
// day names to Hindi using two parallel arrays.
public class LocalDigits
{
    static String toDevanagariDigits(String s)
    {
        String result = "";
        for (int i = 0; i < s.length(); i++)
        {
            char c = s.charAt(i);
            if (c >= '0' && c <= '9')
                result += (char) ('०' + (c - '0'));   // U+0966 is Devanagari zero
            else
                result += c;
        }
        return result;
    }

    static String[] english = {"Sunday", "Monday", "Tuesday"};
    static String[] hindi = {"रविवार",
                             "सोमवार",
                             "मंगलवार"};

    static String lookup(String word)
    {
        for (int i = 0; i < english.length; i++)
            if (english[i].equalsIgnoreCase(word))
                return hindi[i];
        return "?";                                       // not found in the table
    }

    public static void main(String[] args)
    {
        System.out.println(toDevanagariDigits("Class 11, Room 204"));
        System.out.println("Monday -> " + lookup("Monday"));
        System.out.println("tuesday -> " + lookup("tuesday"));
        System.out.println("Friday -> " + lookup("Friday"));
    }
}

Output:

Class ११, Room २०४
Monday -> सोमवार
tuesday -> मंगलवार
Friday -> ?

Worked example

Using the offset method, which Devanagari digit code represents 7? [1 mark]

Try it first, then show the solutionSolution
  1. Code = 0x966 + 7 = 0x96D = 2413 (decimal).

Answer: U+096D (2413 in decimal), the Devanagari digit seven.

Encodings in real life

Each concept, met in an everyday situation. Read the situation, answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.

Garbled text

Suppose you receive a message in Hindi that shows up as 'कमल' on an old program.

What has gone wrong?

Try it first, then show the solutionSolution
  1. The text was stored in UTF-8 (3 bytes per Devanagari letter).
  2. The old program read each byte as a separate 8-bit character in a Western code page, producing gibberish.

Answer: An encoding mismatch: UTF-8 bytes were decoded with a different (8-bit) encoding.

Memory hook: Write and read with the same encoding.

Case conversion by code

Imagine you are writing a program to convert a user's name to capitals without using built-in methods.

How can you convert 'r' to 'R'?

Try it first, then show the solutionSolution
  1. Check that the character is between 'a' and 'z'.
  2. Subtract 32 from its code: 'r' (114) − 32 = 82 = 'R'.

Answer: Subtract 32 from the code of each small letter.

Memory hook: Small minus 32 is capital.

Multilingual signboards

Suppose a railway display must show station names in English, Hindi and Tamil on the same screen.

Which encoding should the software use, and why not ISCII?

Try it first, then show the solutionSolution
  1. Unicode allows all three scripts in one string without switching codes.
  2. ISCII handles one Indian script at a time with switching codes and has weak software support.

Answer: Unicode (for example UTF-8), because it represents all scripts together and is universally supported.

Memory hook: Many scripts, one string: Unicode.

Topics in this chapter

Encodings: syntax and key facts

Codes from bits
Number of codes = 2ⁿ for n bits
7 bits: 128; 8 bits: 256; 16 bits: 65,536.
ASCII patterns
small letter = capital + 32; code of digit d = 48 + d
'A' = 65, 'a' = 97, '0' = 48.
Unicode code space
17 planes × 65,536 = 1,114,112 code points (U+0000 to U+10FFFF)
UTF-8 sizes
ASCII character = 1 byte; Devanagari character = 3 bytes; UTF-16: 2 bytes for most characters
Devanagari digit
Code of digit d = 0x966 + d

Encodings: diagrams to practise

Practise each one on paper: draw it from the checklist, then tick off every label.

From key to screen

Explain how characters are encoded and displayed.

Draw

  1. Keyboard 'A' → code 65 → binary 01000001 stored in memory → font lookup → 'A' on screen.
  2. Below it, the same chain for 'क' → U+0915 → UTF-8 bytes E0 A4 95 → Devanagari font → 'क'.

Label

  • character
  • code point
  • bytes
  • glyph

Watch out: Separate the character, its number (code point) and its bytes (encoding form).

ASCII, ISCII and Unicode compared

Compare encodings.

Draw

  1. Three columns. Rows: bits, number of characters, scripts covered, compatibility with ASCII, current use.
  2. ASCII: 7, 128, English, —, legacy and the base of others.
  3. ISCII: 8, 256, one Indian script at a time, lower half = ASCII, replaced by Unicode.
  4. Unicode: code points to U+10FFFF (UTF-8/16/32), all scripts, first 128 = ASCII, universal.

Label

  • ASCII
  • ISCII
  • Unicode

Watch out: This table answers most comparison questions.

How the school exam asks Encodings

The question patterns to expect, and the method that works for each.

Question typeHow it is askedMethod
Objective (1-2 marks)Number of characters in ASCII; code of a letter; full forms; limitations of ASCII.Use the code patterns (+32, 48 + d); learn full forms.
Short answer (2-5 marks)Compare ASCII, ISCII and Unicode; explain how Unicode represents a local language; why Java can handle local-language strings.Table of comparison; code points and blocks; Java char is 16-bit Unicode.
Programming (5-10 marks)Write a Java program that converts case using codes, prints codes, or looks up local-language equivalents.Loop over characters; use casts and offsets; parallel arrays for lookup.

Tricks to remember Encodings

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • 65, 97, 48

    'A' = 65, 'a' = 97, '0' = 48: 'Sixty-five Apples, ninety-seven apples, forty-eight zeros'.

    Use it when: ASCII codes.

  • ASCII ⊂ ISCII ⊂ (layout of) Unicode

    Each newer code keeps the old ASCII codes at the start.

    Use it when: Compatibility.

  • U+09xx is Devanagari

    Hindi lives at U+0900 to U+097F.

    Use it when: Unicode blocks.

  • Java char = 16-bit Unicode

    That is why 'क' fits in a char.

    Use it when: Java and local languages.

Encodings: exam-level solved questions

Ordered from exam level to HOTS. Cover the solution, write your own, then compare step by step.

Example 1: ASCII size · 1 mark · MCQExam level

Standard ASCII can represent:
(a) 64 characters
(b) 128 characters
(c) 256 characters
(d) 65,536 characters

Try it first, then show the solutionSolution
  1. ASCII uses 7 bits: 2⁷ = 128.

Answer: (b) 128 characters.

Example 2: Java and Unicode · 1 mark · Assertion-reasonHarder exam level

Assertion: A Java String can hold the word कमल.
Reason: The Java char type stores 16-bit Unicode values.
(a) Both Assertion and Reason are true and Reason is the correct explanation of Assertion.
(b) Both Assertion and Reason are true but Reason is not the correct explanation of Assertion.
(c) Assertion is true but Reason is false.
(d) Both Assertion and Reason are false.

Try it first, then show the solutionSolution
  1. Devanagari letters have Unicode code points that fit in a 16-bit char: the Reason explains the Assertion.

Answer: (a)

Example 3: Codes and bytes · 2 marks · Short answerExam level

Find the ASCII codes (decimal and 8-bit binary) of 'M' and '5'.

Try it first, then show the solutionSolution
  1. 'M' is the 13th capital letter: 65 + 12 = 77 = 01001101.
  2. '5' = 48 + 5 = 53 = 00110101.

Answer: 'M' = 77 = 01001101; '5' = 53 = 00110101.

Example 4: Storage in different encodings · 5 marks · Short answerHarder exam level

Suppose a message has 120 English characters and 80 Devanagari characters. Find the storage needed in (a) UTF-8, (b) UTF-16, (c) UTF-32. Which is most compact here, and why could ASCII not be used?

Try it first, then show the solutionSolution
  1. (a) UTF-8: 120 × 1 + 80 × 3 = 360 bytes.
  2. (b) UTF-16: 200 × 2 = 400 bytes.
  3. (c) UTF-32: 200 × 4 = 800 bytes.
  4. UTF-8 is most compact because the many English characters take only 1 byte each.
  5. ASCII has no codes for Devanagari characters.

Answer: (a) 360 bytes; (b) 400 bytes; (c) 800 bytes; UTF-8 is most compact; ASCII cannot encode Devanagari.

Example 5: Encodings compared · 5 marks · Short answerHarder exam level

Compare ASCII, ISCII and Unicode on bits, number of characters, scripts and compatibility.

Try it first, then show the solutionSolution
  1. Bits: ASCII 7; ISCII 8; Unicode code points up to 21 bits, stored with UTF-8, UTF-16 or UTF-32.
  2. Characters: 128; 256; over a million code points possible.
  3. Scripts: English only; Indian scripts (one at a time with switching); nearly all world scripts together.
  4. Compatibility: base standard; codes 0-127 equal ASCII; first 128 code points equal ASCII.
  5. Current use: legacy; largely replaced; universal standard.

Answer: ASCII: 7-bit, 128, English. ISCII: 8-bit, 256, Indian scripts with ASCII in the lower half. Unicode: code points to U+10FFFF in UTF forms, all scripts, ASCII-compatible and universal.

Example 6: Word lookup program · 10 marks · Long answerHOTS / competency

Write a Java class that (a) converts every Latin digit in a string to the corresponding Devanagari digit using a code offset, and (b) looks up the Hindi equivalent of an English day name using two parallel arrays, returning '?' if the word is not in the table. Show the output for 'Class 11, Room 204', 'Monday', 'tuesday' and 'Friday'.

Try it first, then show the solutionSolution
  1. toDevanagariDigits: loop over characters; if c is between '0' and '9', append (char) ('\u0966' + (c - '0')); otherwise append c.
  2. Two static arrays: english = {Sunday, Monday, Tuesday} and hindi holding the Unicode strings for the same days in the same order.
  3. lookup: for i from 0 to length − 1, if english[i].equalsIgnoreCase(word) return hindi[i]; after the loop return "?".
  4. main calls both methods with the given inputs.
  5. Output (compiled program LocalDigits): 'Class ११, Room २०४'; Monday → सोमवार; tuesday → मंगलवार; Friday → ?.

Answer: See the compiled LocalDigits program in the table-lookup section; it prints Class ११, Room २०४, then सोमवार, मंगलवार and ? for Friday.

Case-study practice (Section D style)

Read the situation, then answer every part. In a school exam set on the board pattern this is a 5-mark question split into 2 + 2 + 1 marks.

A bilingual school notice board

Suppose a school builds a digital notice board in Java that shows each notice in English and Hindi. The developer stores English text in an old ASCII-based file and finds Hindi text appearing as question marks. A teacher suggests storing everything in UTF-8 and using Unicode escapes for fixed Hindi labels.

  1. (i) · 2 marks

    Why does Hindi text appear as question marks?

    Answer

    Answer: ASCII has no codes for Devanagari characters, so when Hindi text is saved or read as ASCII, those characters cannot be represented and are replaced by '?'.

    2 marks.

  2. (ii) · 2 marks

    Why will UTF-8 solve the problem, and how many bytes will the 3-letter word कमल take?

    Answer

    Answer: UTF-8 encodes all Unicode characters, including Devanagari, while keeping English as 1 byte each; कमल takes 3 × 3 = 9 bytes.

    1 mark reason, 1 mark bytes.

  3. (iii) · 1 mark

    Write the Unicode escape for क and explain why Java can display it.

    Answer

    Answer: '\u0915'; Java chars are 16-bit Unicode values, so the code point fits in a char and prints as क with a suitable font and UTF-8 output.

    1 mark.

Where the marks are

How a typical answer is split into step marks. Show every step: a right final answer alone rarely earns full marks.

ASCII codes in decimal and binary (2 marks) (2 marks)

StepMarks
Each code correct in decimal and binary2

Storage in UTF-8, UTF-16 and UTF-32 (5 marks) (5 marks)

StepMarks
UTF-8 bytes1
UTF-16 bytes1
UTF-32 bytes1
Most compact with reason1
Why ASCII cannot be used1

Digit conversion and word lookup program (10 marks) (10 marks)

StepMarks
Digit loop with offset conversion3
Parallel arrays declared with matching order2
Lookup with equalsIgnoreCase and not-found case3
main with correct calls and output2

Where students lose marks in Encodings

The slips examiners see most often, and what to write instead.

  • Mistake: Writing that ASCII is an 8-bit code

    Standard ASCII is 7-bit (128 characters); 8-bit versions are extended ASCII.

    Do this: ASCII 7 bits; extended ASCII 8 bits.

    Usually costs: 1 mark.

  • Mistake: Confusing Unicode with UTF-8

    Unicode assigns code points; UTF-8 is one way of storing them as bytes.

    Do this: Code point (number) vs encoding form (bytes).

    Usually costs: 1 mark.

  • Mistake: Assuming every character is 1 byte

    In UTF-8, Devanagari letters take 3 bytes; in UTF-16, 2 bytes each.

    Do this: Count bytes per encoding form.

    Usually costs: 1-2 marks.

  • Mistake: Forgetting the not-found case in a table lookup

    Programs must handle words missing from the table.

    Do this: Return a message after the loop ends.

    Usually costs: 1 mark.

Practice questions on Encodings

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQExam level

    The Unicode block for Devanagari begins at:
    (a) U+0041
    (b) U+0900
    (c) U+0B80
    (d) U+FFFF

    Hint

    Hindi lives in U+09xx.

    Answer

    (b) U+0900.

  2. Q2 · 1 mark · Very short answerExam level

    Expand ISCII.

    Hint

    Indian.

    Answer

    Indian Script Code for Information Interchange.

  3. Q3 · 2 marks · Short answerExam level

    State three limitations of ASCII.

    Hint

    Size, scripts, standardisation.

    Answer

    Only 128 characters; cannot represent Indian and other non-Latin scripts or accented letters; extended 8-bit versions are not standard, so the same code means different characters on different systems.

  4. Q4 · 2 marks · Short answerHarder exam level

    What does the following print? char c = 'D'; c += 3; System.out.println(c + " " + (int) c);

    Hint

    Compound assignment keeps char type.

    Answer

    G 71 ('D' is 68; 68 + 3 = 71 = 'G'; compound assignment casts back to char).

  5. Q5 · 2 marks · Short answerHarder exam level

    How many bytes does a string of 50 Devanagari characters take in UTF-8 and in UTF-16? Which is smaller?

    Hint

    3 and 2 bytes.

    Answer

    UTF-8: 50 × 3 = 150 bytes; UTF-16: 50 × 2 = 100 bytes; UTF-16 is smaller for Devanagari-only text.

  6. Q6 · 5 marks · Short answerHarder exam level

    Explain how Unicode represents a word in a local language, using an example.

    Hint

    Code points, block, encoding form.

    Answer

    Each letter has a unique code point in its script's block. The Hindi word कमल is the sequence U+0915 (क), U+092E (म), U+0932 (ल), all in the Devanagari block U+0900-U+097F. Matras and the halant are separate code points combined by the font when shown. The code points are stored as bytes by an encoding form: in UTF-8 each takes 3 bytes (9 bytes in all); in UTF-16, 2 bytes each. Because Java chars are UTF-16 values, a Java String holds the word directly.

  7. Q7 · 5 marks · Short answerHOTS / competency

    Write a Java method int countUpper(String s) that counts capital Latin letters using character codes (without Character methods), and state its result for "ISC Class XI".

    Hint

    Codes 65 to 90.

    Answer

    int countUpper(String s) { int k = 0; for (int i = 0; i < s.length(); i++) { int c = s.charAt(i); if (c >= 65 && c <= 90) k++; } return k; }. For "ISC Class XI" the capitals are I, S, C, C, X, I: result 6.

  8. Q8 · 2 marks · Short answerHOTS / competency

    Why did Unicode's Indian-script blocks follow the ISCII layout, and what advantage does Unicode have over ISCII?

    Hint

    Compatibility; mixing scripts.

    Answer

    Following ISCII's arrangement made conversion of existing Indian-language data easy. Unicode's advantage is that every script has its own code points, so many scripts can appear together in one text without switching codes, and it is supported worldwide.

  9. Q9 · 2 marks · Short answerHOTS / competency

    Suppose a program converts the string "2026" to Devanagari digits using the offset 0x966. Give the code points produced and the resulting string.

    Hint

    Add the digit value to 0x966.

    Answer

    2 → U+0968, 0 → U+0966, 2 → U+0968, 6 → U+096C; the string is २०२६.

  10. Q10 · 5 marks · Long answerHOTS / competency

    Write an algorithm that converts a string to capital letters using only character codes, and trace it for "aB3c".

    Hint

    Subtract 32 for 97-122.

    Answer

    result = ""; for each character c in s: if code(c) is between 97 and 122, append the character with code code(c) − 32; else append c unchanged. Return result. Trace: 'a' (97) → 'A'; 'B' (66) unchanged; '3' (51) unchanged; 'c' (99) → 'C'. Result "AB3C".

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. 1.Bits in standard ASCII?Show answer

    7 (128 characters).

  2. 2.Code of 'A' and 'a'?Show answer

    65 and 97.

  3. 3.ISCII bits?Show answer

    8.

  4. 4.Highest Unicode code point?Show answer

    U+10FFFF.

  5. 5.Bytes for a Devanagari letter in UTF-8?Show answer

    3.

  6. 6.Size of a Java char?Show answer

    16 bits (UTF-16).

Best order to study it

  1. Character sets and encodings; bits vs codes.
  2. ASCII and its limitations.
  3. ISCII.
  4. Unicode: code points, blocks, UTF forms.
  5. Java's Unicode chars and strings.
  6. Table lookup for local-language equivalents.

Quick revision checklist

The night before the exam: can you do each of these without looking?

  • Encoding: character ↔ number ↔ bits.
  • ASCII: 7-bit, 128; 'A' 65, 'a' 97, '0' 48; English only.
  • ISCII: 8-bit, lower half ASCII, upper half Indian scripts (BIS 1991).
  • Unicode: code points U+0000-U+10FFFF; Devanagari U+0900-U+097F; UTF-8, UTF-16, UTF-32.
  • Java char = 16-bit Unicode; '\u0915' = क.
  • Lookup: parallel arrays or code offset (digits from U+0966).

Encodings: frequently asked questions

Is Unicode an encoding or a character set?

Both, in practice: Unicode defines the character set and code points, and its encoding forms (UTF-8, UTF-16, UTF-32) define how the code points are stored as bytes.

Why do Hindi letters take 3 bytes in UTF-8 but English letters only 1?

UTF-8 is variable-length: code points up to 127 (ASCII) use 1 byte; higher code points, such as the Devanagari block, need more bytes (3 for U+0800 to U+FFFF).

Do I need to remember Unicode values for exams?

Remember the ASCII codes of 'A', 'a' and '0', and that Devanagari is in the U+0900 block. Other values are usually given in the question.

Based on: CISCE ISC 2028 Computer Science syllabus (Classes XI and XII); CISCE Regulations for the ISC Examination Year 2028 (Class XI internal examination)