Skip to content
Computer ScienceCBSE Class 11 · Chapter 3

Encoding Schemes and Number System Class 11: ASCII, Unicode and Base Conversions

Updated 14 October 2026 · Fact-checked

This Class 11 Computer Science chapter explains how characters become binary codes through ASCII (7-bit), ISCII (8-bit, Indian scripts) and Unicode (UTF-8, UTF-32), and how numbers are written in binary, octal, decimal and hexadecimal. You learn positional values and every conversion between the four systems, including numbers with a fractional part.

What Encoding Schemes and Number System is about

This chapter is in Unit I, Computer Systems and Organisation, which carries 10 of the 70 theory marks in the school annual exam together with Computer System and Boolean Logic. It gives the unit's numerical questions: conversions between number systems and encoding a word in ASCII.

The 2026-27 syllabus wording is: "Number System: Binary, Octal, Decimal and Hexadecimal number system; conversion between number systems. Encoding Schemes: ASCII, ISCII, and Unicode (UTF8, UTF32)". So you need:

  • what encoding is and why standard codes are needed
  • ASCII (7-bit, 128 characters, English only), ISCII (8-bit, 256 codes, Indian scripts) and Unicode (one code point for every character of every script) with its encodings UTF-8 (1 to 4 bytes per character) and UTF-32 (always 4 bytes)
  • the positional number systems with base 2, 8, 10 and 16: digits, position numbers and positional values
  • all conversions: decimal to any base (repeated division), any base to decimal (sum of digit × positional value), binary to octal/hex and back (groups of 3 or 4 bits), octal to hex through binary, and numbers with a fractional part (repeated multiplication)
  • uses of hexadecimal: memory addresses and colour codes

Weightage: This chapter is part of Unit I, Computer Systems and Organisation, which carries 10 of the 70 theory marks in the school annual exam together with Computer System and Boolean Logic.Source: CBSE Computer Science (083) syllabus 2026-27, Class XI distribution of marks, Unit I Computer Systems and Organisation

Key concepts

Encoding and ASCII
NCERT section NCERT 2.1, 2.1.1

A computer understands only 0s and 1s. When a key is pressed it is mapped to a code value, which is stored in binary. Encoding is converting data into such codes using a fixed scheme. Because everyone uses the same standard scheme, the letter A gives the same code on every keyboard.

ASCII (American Standard Code for Information Interchange) was built to standardise character codes. It uses 7 bits, so it can encode 2^7 = 128 characters: English letters, digits, punctuation and control codes. Some values to remember: space = 32, '0' = 48, 'A' = 65, 'a' = 97; the codes of letters and digits run in order, and a small letter's code is the capital's code + 32. The weakness of ASCII is that it covers English only.

Worked example

Encode the word CODE in ASCII and in 7-bit binary.

Try it first, then show the solutionSolution
  1. C = 67, O = 79, D = 68, E = 69 (A = 65, so count on).
  2. 67 = 1000011, 79 = 1001111, 68 = 1000100, 69 = 1000101.

Answer: ASCII: 67 79 68 69. Binary: 1000011 1001111 1000100 1000101.

ISCII and Unicode
NCERT section NCERT 2.1.2, 2.1.3

ISCII (Indian Script Code for Information Interchange) was developed in India in the mid-1980s for Indian languages. It is an 8-bit code, so it has 2^8 = 256 codes: the first 128 are the ASCII codes, and the upper codes (160-255) are used for the aksharas of Indian scripts.

Many separate schemes could not understand each other's text. Unicode solves this by giving a unique number (code point) to every character of every written language, whatever the device, operating system or software. Its first 128 values match ASCII, so Unicode is a superset of ASCII. Code points are written in hexadecimal, e.g. 'अ' is U+0905 and 'A' is U+0041.

A code point is stored using an encoding:

  • UTF-8: variable length, 1 to 4 bytes per character. ASCII characters take 1 byte, so English text stays small; Devanagari letters take 3 bytes. It is the usual encoding of web pages.
  • UTF-32: fixed length, 4 bytes (32 bits) for every character; simple to index but takes the most space.

(UTF-16, using 2 or 4 bytes, also exists.)

Worked example

How many bytes does the word 'India' take in UTF-8 and in UTF-32? Why the difference?

Try it first, then show the solutionSolution
  1. 'India' has 5 ASCII characters; each takes 1 byte in UTF-8: 5 bytes.
  2. In UTF-32 each takes 4 bytes: 5 × 4 = 20 bytes.
  3. UTF-8 is variable length and uses the fewest bytes for ASCII characters.

Answer: 5 bytes in UTF-8 and 20 bytes in UTF-32.

Positional number systems
NCERT section NCERT 2.2

A number system is a way of writing numbers. The count of distinct symbols it uses is its base or radix:

SystemBaseSymbols
Binary20, 1
Octal80-7
Decimal100-9
Hexadecimal160-9, A(10), B(11), C(12), D(13), E(14), F(15)

All four are positional: a digit's value depends on its position. In the integer part, the rightmost digit is at position 0, and positions rise by 1 to the left; in the fraction part, the first digit after the point is at position -1, then -2, and so on. The positional value of position p in base b is b^p. The number's value = sum of (digit × positional value). Example: (123.45)₁₀ = 1×10² + 2×10¹ + 3×10⁰ + 4×10⁻¹ + 5×10⁻². The base is written as a subscript, e.g. (1011)₂, (17)₈, (2F)₁₆.

Worked example

In (5307)₈, find the positional value of the digit 3 and the value it contributes.

Try it first, then show the solutionSolution
  1. Positions from the right: 7 at 0, 0 at 1, 3 at 2, 5 at 3.
  2. Positional value of position 2 in base 8 = 8² = 64.
  3. Contribution = 3 × 64 = 192.

Answer: Positional value 64; the digit 3 contributes 192.

Decimal to binary, octal or hexadecimal
NCERT section NCERT 2.3.1, 2.3.4 (A)

For the integer part, divide repeatedly by the new base and note each remainder until the quotient is 0. Read the remainders from bottom to top (the last remainder is the leftmost digit). In hexadecimal write remainders 10-15 as A-F.

For a fractional part, multiply repeatedly by the new base; each time, write down the integer part of the product and carry on with the fraction left. Read the integer parts from top to bottom. Stop when the fraction becomes 0, when it starts repeating, or after a fixed number of steps (the answer is then approximate).

Worked example

Convert (156)₁₀ to binary, octal and hexadecimal.

Try it first, then show the solutionSolution
  1. Binary: 156/2 = 78 r0, 78/2 = 39 r0, 39/2 = 19 r1, 19/2 = 9 r1, 9/2 = 4 r1, 4/2 = 2 r0, 2/2 = 1 r0, 1/2 = 0 r1. Bottom to top: 10011100.
  2. Octal: 156/8 = 19 r4, 19/8 = 2 r3, 2/8 = 0 r2: 234.
  3. Hex: 156/16 = 9 r12 (C), 9/16 = 0 r9: 9C.

Answer: (10011100)₂ = (234)₈ = (9C)₁₆.

Binary, octal or hexadecimal to decimal
NCERT section NCERT 2.3.2, 2.3.4 (B)

Write the position number under each digit, multiply each digit by base^position, and add. In hexadecimal replace letters by their values (A = 10 ... F = 15). For digits after the point use negative powers: base^-1, base^-2, ...

Memorise the binary positional values 1, 2, 4, 8, 16, 32, 64, 128, 256 and the fractions 0.5, 0.25, 0.125: then a binary number can be converted by adding the values under its 1s.

Worked example

Convert (2AF)₁₆ and (101.101)₂ to decimal.

Try it first, then show the solutionSolution
  1. 2AF: 2×16² + 10×16¹ + 15×16⁰ = 512 + 160 + 15 = 687.
  2. 101.101: 1×4 + 0×2 + 1×1 + 1×0.5 + 0×0.25 + 1×0.125 = 5.625.

Answer: (2AF)₁₆ = (687)₁₀; (101.101)₂ = (5.625)₁₀.

Binary to octal and hexadecimal (and back)
NCERT section NCERT 2.3.3

Since 8 = 2³ and 16 = 2⁴, each octal digit stands for exactly 3 bits and each hexadecimal digit for exactly 4 bits.

  • Binary to octal: group the bits in threes from the binary point outwards (right to left for the integer part, left to right for the fraction), padding with 0s at the ends; replace each group by its octal digit.
  • Binary to hexadecimal: the same with groups of four.
  • Octal or hex to binary: replace each digit by its 3-bit or 4-bit group.
  • Octal to hexadecimal (or the reverse): go through binary.
HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

Worked example

Convert (1011011101)₂ to octal and to hexadecimal.

Try it first, then show the solutionSolution
  1. Octal groups from the right: 1 | 011 | 011 | 101 → 001 011 011 101 → 1 3 3 5.
  2. Hex groups from the right: 10 | 1101 | 1101 → 0010 1101 1101 → 2 D D.

Answer: (1335)₈ and (2DD)₁₆ (both equal 733 in decimal).

Why hexadecimal is used
NCERT section NCERT 2.2.5

Long binary strings are hard to read and copy, so programmers use hexadecimal (or octal) as a short form: one hex digit replaces four bits.

  • Memory addresses: a 16-bit address such as 1100 0000 1111 0001 is written C0F1.
  • Colour codes: a screen colour is made of red, green and blue parts of 8 bits each (24 bits in all, about 16 million colours). Each part is written as two hex digits: red is (FF, 00, 00), white (FF, FF, FF), black (00, 00, 00), grey (80, 80, 80). Web pages write these as #FF0000 and so on.
  • Unicode code points are also written in hex (U+0905).

Worked example

A web colour is #2D9CFF. Find the decimal values of its red, green and blue parts.

Try it first, then show the solutionSolution
  1. Red 2D = 2×16 + 13 = 45.
  2. Green 9C = 9×16 + 12 = 156.
  3. Blue FF = 15×16 + 15 = 255.

Answer: (45, 156, 255): a bright sky blue.

Encoding Schemes and Number System 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.

Hex colour codes

Suppose you are designing your school club's web page and the logo colour is written as #FF8000.

What are the red, green and blue values in decimal, and roughly what colour is it?

Try it first, then show the solutionSolution
  1. FF = 255, 80 = 8 × 16 = 128, 00 = 0.
  2. Full red, half green, no blue.

Answer: (255, 128, 0): orange.

Memory hook: Two hex digits per colour part: RR GG BB.

UTF-8 and message size

Imagine a chat app counts the bytes of each message. You send 'Hello' to one friend and 'नमस्ते' (6 Unicode characters) to another.

How many bytes does each message take in UTF-8?

Try it first, then show the solutionSolution
  1. 'Hello': 5 ASCII characters × 1 byte = 5 bytes.
  2. Each Devanagari character takes 3 bytes in UTF-8: 6 × 3 = 18 bytes.

Answer: 5 bytes and 18 bytes.

Memory hook: UTF-8: English 1 byte, Hindi 3 bytes per character.

Binary place values

Suppose eight bulbs in a row stand for the bits of a number, with the leftmost bulb worth 128 and the rightmost worth 1. The bulbs read on, off, off, on, on, on, off, off.

Which decimal number is shown?

Try it first, then show the solutionSolution
  1. Pattern 10011100; the 'on' bulbs are worth 128, 16, 8 and 4.
  2. 128 + 16 + 8 + 4 = 156.

Answer: 156.

Memory hook: Add the place values under the 1s.

Topics in this chapter

Encoding Schemes and Number System: syntax and key facts

Value of a number in base b
N = Σ digit × b^position (positions ... 2, 1, 0 . -1, -2 ...)
Used for any base to decimal.
Decimal to base b
Integer: divide by b, remainders bottom to top; fraction: multiply by b, integer parts top to bottom
Stop the fraction when it becomes 0 or repeats.
Grouping
1 octal digit = 3 bits; 1 hex digit = 4 bits
Group outwards from the binary point; pad with zeros at the ends.
Code sizes
  1. 1.ASCII 7 bits
  2. 2.128 codes; ISCII 8 bits
  3. 3.256 codes; UTF-8: 1-4 bytes; UTF-32: 4 bytes
n bits give 2^n different codes.
Key ASCII values
space 32, '0' 48, 'A' 65, 'a' 97
Lowercase = uppercase + 32.
Python checks
bin(n), oct(n), hex(n); int('101', 2), int('17', 8), int('1F', 16); ord('A'), chr(65)
Use them to check hand conversions.

How the school exam asks Encoding Schemes and Number System

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

Question typeHow it is askedMethod
Conversion"Convert (245)₁₀ to binary and hexadecimal", "(3A.8)₁₆ to decimal", "(746)₈ to hexadecimal" (1-3 marks each).Show the division or multiplication table, or the groups of bits; write the base with every answer.
Encode a word"Encode the word 'CBSE' in ASCII and give its binary form" (2 marks).Write the decimal ASCII code of each letter, then its 7-bit binary.
Compare encoding schemes"Why was Unicode needed?" "Differentiate between UTF-8 and UTF-32" (2-3 marks).Give bits or bytes per character, number of characters and coverage (English, Indian scripts, all scripts).
Find the missing digit or baseFind x if (1x1)₂ = (7)₁₀, or the base b in which 21 = (9)₁₀ (2 marks, harder).Expand with positional values and solve the small equation.
ApplicationsUses of hexadecimal, colour codes, memory addresses (1-2 marks).Say that hex is a compact form of binary (one digit for four bits) and give one example.

Tricks to remember Encoding Schemes and Number System

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

  • Divide down, read up

    Decimal integer to another base: divide down the page, read the remainders up.

    Use it when: Integer conversions.

  • Multiply down, read down

    Decimal fraction: multiply down the page and read the integer parts down.

    Use it when: Fraction conversions.

  • Oct 3, Hex 4

    8 = 2³ and 16 = 2⁴, so octal digits take groups of 3 bits and hex digits groups of 4 bits.

    Use it when: Binary-octal-hex shortcuts.

  • 65 and 97

    Capital A is 65; small a is 97 = 65 + 32; digit 0 is 48.

    Use it when: Encoding words in ASCII.

  • UTF-8 is elastic, UTF-32 is fixed

    8 stretches from 1 to 4 bytes; 32 bits is always 4 bytes.

    Use it when: Comparing Unicode encodings.

Encoding Schemes and Number System: exam-level solved questions

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

Example 1: Octal to hexadecimal · 2 marks · Short answerExam level

Convert (573)₈ to hexadecimal.

Try it first, then show the solutionSolution
  1. Octal to binary: 5 = 101, 7 = 111, 3 = 011 → 101111011.
  2. Regroup in fours from the right: 1 | 0111 | 1011 → 0001 0111 1011 → 1 7 B.

Answer: (17B)₁₆

Example 2: Fraction to binary that repeats · 3 marks · Short answerHarder exam level

Convert (0.3)₁₀ to binary up to 6 places and say why it does not end.

Try it first, then show the solutionSolution
  1. 0.3 × 2 = 0.6 (0); 0.6 × 2 = 1.2 (1); 0.2 × 2 = 0.4 (0); 0.4 × 2 = 0.8 (0); 0.8 × 2 = 1.6 (1); 0.6 × 2 = 1.2 (1).
  2. The fraction 0.6 has come back, so the pattern 1001 repeats for ever.

Answer: (0.3)₁₀ ≈ (0.010011)₂; the digits 1001 repeat, so 0.3 has no exact binary form.

Example 3: Checking conversions with Python · 3 marks · Short answerHarder exam level

Predict the output of this program.

n = 156
print(bin(n), oct(n), hex(n))
print(int('2AF', 16), int('745', 8), int('101101', 2))
print(ord('A') + 32, chr(ord('a') - 32))
Try it first, then show the solutionSolution
  1. 156 is 10011100 in binary, 234 in octal, 9c in hex; Python adds the prefixes 0b, 0o, 0x and uses lowercase letters.
  2. 2AF = 687; 745 in octal = 7×64 + 4×8 + 5 = 485; 101101 = 32 + 8 + 4 + 1 = 45.
  3. 65 + 32 = 97; 97 - 32 = 65, which is chr 'A'.

Answer: 0b10011100 0o234 0x9c
687 485 45
97 A

Example 4: Find the base · 2 marks · Short answerHOTS / competency

In which base b is (121)_b = (49)₁₀?

Try it first, then show the solutionSolution
  1. Expand: 1×b² + 2×b + 1 = 49.
  2. b² + 2b + 1 = (b + 1)² = 49, so b + 1 = 7 and b = 6.
  3. Check: digits 1 and 2 are valid in base 6; 36 + 12 + 1 = 49.

Answer: Base 6.

Example 5: Encoding sizes compared · 3 marks · Short answerHOTS / competency

A school sends the SMS 'Exam 5 Nov' (10 characters including spaces) and the same notice in Hindi with 8 Devanagari characters and 2 spaces. Find the size of each in 7-bit ASCII (where possible), UTF-8 and UTF-32. Which encoding would you choose for a bilingual app, and why?

Try it first, then show the solutionSolution
  1. English: ASCII 10 × 7 = 70 bits; UTF-8 10 × 1 = 10 bytes; UTF-32 10 × 4 = 40 bytes.
  2. Hindi: ASCII cannot encode Devanagari. UTF-8: 8 × 3 + 2 × 1 = 26 bytes; UTF-32: 10 × 4 = 40 bytes.
  3. UTF-8 covers both scripts and uses less space here.

Answer: English 70 bits / 10 B / 40 B; Hindi not possible / 26 B / 40 B. Choose UTF-8: it handles every script and keeps English text compact.

Example 6: Hex to decimal with a fraction · 2 marks · Short answerHarder exam level

Convert (1A.C)₁₆ to decimal and to binary.

Try it first, then show the solutionSolution
  1. Decimal: 1×16 + 10×1 + 12×16⁻¹ = 16 + 10 + 0.75 = 26.75.
  2. Binary: 1 = 0001, A = 1010, C = 1100 → 00011010.1100 = 11010.11.

Answer: (26.75)₁₀ = (11010.11)₂

Example 7: ASCII arithmetic · 2 marks · Short answerExam level

Encode 'Cs' in ASCII and 7-bit binary.

Try it first, then show the solutionSolution
  1. 'C' = 67 = 1000011.
  2. 's' is the 19th letter, so its code is 97 + 18 = 115 = 1110011.

Answer: 67 115 → 1000011 1110011.

Example 8: Largest value · 2 marks · Short answerHarder exam level

Arrange in ascending order: (111111)₂, (77)₈, (3E)₁₆, (64)₁₀.

Try it first, then show the solutionSolution
  1. (111111)₂ = 63; (77)₈ = 7×8 + 7 = 63; (3E)₁₆ = 3×16 + 14 = 62; (64)₁₀ = 64.

Answer: (3E)₁₆ < (111111)₂ = (77)₈ < (64)₁₀.

Case-study practice (Section E style)

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

Designing a badge for a school event

Suppose the student council is making digital badges. Each badge stores the student's initials, a colour in hex and a 16-bit roll number. One badge has initials 'RK', colour #800080 and roll number stored as 0000 0100 1101 0010.

  1. (i) · 1 mark

    Give the ASCII codes of 'R' and 'K' in decimal and binary.

    Answer

    Answer: R = 82 = 1010010; K = 75 = 1001011.

    A = 65; R is 17 letters later, K is 10 letters later.

  2. (ii) · 1 mark

    Find the red, green and blue values of the colour in decimal.

    Answer

    Answer: (128, 0, 128): purple.

    80 = 8 × 16 = 128; 00 = 0.

  3. (iii) · 1 mark

    Write the roll number in hexadecimal and decimal.

    Answer

    Answer: 04D2 in hex = 4×256 + 13×16 + 2 = 1234.

    Groups of four: 0000 0100 1101 0010 → 0 4 D 2.

  4. (iv) · 1 mark

    The council wants badges to show names in Hindi as well. Which encoding should the app use and how many bytes would the 4-letter name 'रमेश' (4 Unicode characters) take in it?

    Answer

    Answer: Unicode in UTF-8; 4 × 3 = 12 bytes (UTF-32 would need 4 × 4 = 16 bytes).

    ASCII cannot store Devanagari; UTF-8 uses 3 bytes per Devanagari character.

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.

Convert (245)₁₀ into binary and hence into hexadecimal. [2 marks] (2 marks)

StepMarks
Repeated division by 2 with remainders read upwards: 111101011
Grouping in fours from the right: 1111 0101 → F51

What is Unicode? Why was it needed? Compare UTF-8 and UTF-32. [3 marks] (3 marks)

StepMarks
Unicode: a standard that gives a unique code to every character of every written language, independent of device and software; superset of ASCII1
Need: separate schemes (ASCII, ISCII and others) could not read each other's text and ASCII covered English only1
UTF-8 is variable length (1 to 4 bytes, ASCII in 1 byte); UTF-32 is fixed length (4 bytes per character)1

Convert (746.5)₈ into binary and hexadecimal, and verify by converting to decimal. [5 marks] (5 marks)

StepMarks
Each octal digit as 3 bits: 111 100 110 . 101 → (111100110.101)₂1.5
Regroup in fours from the point: 0001 1110 0110 . 1010 → (1E6.A)₁₆1.5
Octal to decimal: 7×64 + 4×8 + 6 + 5×0.125 = 448 + 32 + 6 + 0.625 = 486.6251
Hex to decimal: 1×256 + 14×16 + 6 + 10/16 = 256 + 224 + 6 + 0.625 = 486.625, which matches1

Where students lose marks in Encoding Schemes and Number System

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

  • Mistake: Reading remainders top to bottom

    The first remainder is the least significant (rightmost) digit.

    Wrong working

    13 to binary: remainders 1, 0, 1, 1 → 1011

    Right working

    Read bottom to top → 1101

    Do this: Draw an arrow upwards beside the remainder column.

    Usually costs: 1 mark

  • Mistake: Grouping bits from the left

    Groups must start at the binary point; starting from the left gives a different number.

    Wrong working

    11010 to octal: 110 | 10 → 6 2

    Right working

    11 | 010 → 011 010 → 3 2, so (32)₈

    Do this: Group integer bits from the right, fraction bits from the left.

    Usually costs: 1 mark

  • Mistake: Using 10 as a hex digit

    Each hex digit is one symbol; 10 to 15 are A to F.

    Wrong working

    (122)₁₀ = (7 10)₁₆

    Right working

    (122)₁₀ = (7A)₁₆

    Do this: Change remainders 10-15 to letters before writing the answer.

    Usually costs: 1 mark

  • Mistake: Positive powers after the point

    Fraction digits are at positions -1, -2, ...

    Wrong working

    (0.11)₂ = 1×2¹ + 1×2² = 6

    Right working

    (0.11)₂ = 1×2⁻¹ + 1×2⁻² = 0.75

    Do this: Write position numbers under every digit, negative after the point.

    Usually costs: 1 mark

  • Mistake: Saying UTF-8 always uses 8 bytes, or Unicode uses 16 bits only

    UTF-8 uses 8-bit units and 1 to 4 of them; UTF-32 uses a fixed 4 bytes.

    Wrong working

    UTF-8 stores every character in 8 bytes.

    Right working

    UTF-8 stores a character in 1 to 4 bytes; ASCII characters need only 1.

    Do this: Link the number in the name to bits per unit, not to bytes per character.

    Usually costs: 1 mark

NCERT exercise guide: Encoding Schemes and Number System

What each exercise in the NCERT chapter tests, how to approach it, and a question of the same kind solved step by step. Questions here are written in our own words.

NCERT Chapter 2 exercise: conversion questions

What it tests: Decimal to binary, octal and hex; binary, octal and hex to decimal; binary to octal and hex; octal to hex; numbers with fractions.

How to approach it: Use repeated division (integers) or multiplication (fractions) from decimal, expansion to decimal, and bit grouping between binary, octal and hex. Convert back to check.

Same kind as the fractional conversion questions

Convert (13.375)₁₀ to binary and octal.

Show the solutionSolution
  1. Integer 13: remainders 1, 0, 1, 1 read upwards → 1101.
  2. Fraction 0.375: ×2 = 0.75 (0), ×2 = 1.5 (1), 0.5 × 2 = 1.0 (1) → .011.
  3. Binary 1101.011; group in threes from the point: 001 101 . 011 → 15.3.

Answer: (1101.011)₂ = (15.3)₈.

NCERT Chapter 2 exercise: encoding questions

What it tests: ASCII values of words, why Unicode was needed, comparing ASCII, ISCII and Unicode.

How to approach it: Use 'A' = 65 and 'a' = 97 and count on; compare schemes by bits, number of characters and languages covered.

Same kind as the encode-a-word question

Decode the ASCII codes 72 105 33 into text.

Show the solutionSolution
  1. 72 = 65 + 7 → H.
  2. 105 = 97 + 8 → i.
  3. 33 is the code for '!'.

Answer: Hi!

Practice questions on Encoding Schemes and Number System

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

    Which is the base of the hexadecimal system? (a) 2 (b) 8 (c) 10 (d) 16

    Hint

    Hexa = 6, deca = 10.

    Answer

    (d) 16

  2. Q2 · 2 marks · Short answerExam level

    Convert (45)₁₀ to binary and octal.

    Hint

    45 = 32 + 8 + 4 + 1.

    Answer

    (101101)₂ and (55)₈.

  3. Q3 · 2 marks · Short answerHarder exam level

    Convert (9C4)₁₆ to binary and octal.

    Hint

    Four bits per hex digit, then regroup in threes.

    Answer

    1001 1100 0100 → (100111000100)₂; groups of three 100 111 000 100 → (4704)₈.

  4. Q4 · 2 marks · Short answerHarder exam level

    Convert (0.8125)₁₀ to binary and hexadecimal.

    Hint

    0.8125 × 16 = 13.

    Answer

    Binary: ×2 gives 1, 1, 0, 1 → (0.1101)₂. Hex: 0.8125 × 16 = 13.0 → (0.D)₁₆.

  5. Q5 · 1 mark · Very short answerHarder exam level

    Find x if (1x01)₂ = (13)₁₀.

    Hint

    8 + 4x + 0 + 1 = 13.

    Answer

    x = 1.

  6. Q6 · 2 marks · Short answerExam level

    Why does ISCII need 8 bits while ASCII needs only 7?

    Hint

    Number of characters.

    Answer

    7 bits give only 128 codes, all used by ASCII. ISCII keeps those 128 and needs extra codes for Indian aksharas, so it uses 8 bits, giving 256 codes.

  7. Q7 · 3 marks · Short answerHarder exam level

    Predict the output:

    word = 'Ok'
    for ch in word:
        print(ch, ord(ch), bin(ord(ch))[2:])
    print(len('Ok'.encode('utf-8')), len('Ok'.encode('utf-32-be')))
    Hint

    O is 79, k is 107; [2:] drops '0b'.

    Answer

    O 79 1001111
    k 107 1101011
    2 8

  8. Q8 · 2 marks · Short answerHarder exam level

    A 16-bit memory address is 1010 1111 0000 0011. Write it in hexadecimal and octal.

    Hint

    For octal, group in threes from the right: 1 010 111 100 000 011.

    Answer

    Hex AF03. Octal: 1 010 111 100 000 011 → (127403)₈.

  9. Q9 · 1 mark · MCQHarder exam level

    Assertion (A): UTF-8 text in English takes less space than the same text in UTF-32. Reason (R): UTF-8 stores ASCII characters in one byte, while UTF-32 uses four bytes for every character. Choose (a) both true, R explains A (b) both true, R does not explain A (c) A true, R false (d) A false, R true.

    Hint

    Compare bytes per English letter.

    Answer

    (a)

  10. Q10 · 3 marks · Short answerHOTS / competency

    The largest number that can be written with 3 hexadecimal digits is how many times the largest 3-digit octal number? Show working.

    Hint

    FFF and 777 in decimal.

    Answer

    (FFF)₁₆ = 4095; (777)₈ = 511; 4095 ÷ 511 ≈ 8.01, so about 8 times (exactly 4095/511).

  11. Q11 · 2 marks · Short answerHOTS / competency

    A student says (0.1)₁₀ = (0.1)₂. Explain the error and give the first five binary places of 0.1.

    Hint

    (0.1)₂ = 0.5.

    Answer

    (0.1)₂ means 1 × 2⁻¹ = 0.5, not 0.1. 0.1 × 2: 0.2 (0), 0.4 (0), 0.8 (0), 1.6 (1), 1.2 (1) → (0.00011...)₂, a repeating fraction.

  12. Q12 · 2 marks · Short answerExam level

    Convert (605.12)₈ to decimal.

    Hint

    6×64 + 0 + 5 + 1/8 + 2/64.

    Answer

    384 + 0 + 5 + 0.125 + 0.03125 = 389.15625.

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.How many characters can 7-bit ASCII represent?Show answer

    2^7 = 128.

  2. 2.What is the ASCII code of 'a'?Show answer

    97.

  3. 3.How many bits is ISCII and how many codes does it have?Show answer

    8 bits, 256 codes.

  4. 4.How many bytes does UTF-32 use per character?Show answer

    4 bytes.

  5. 5.What is the base of the octal system?Show answer

    8.

  6. 6.Hexadecimal digit for 13?Show answer

    D.

  7. 7.Positional value of the first digit after the binary point?Show answer

    2^-1 = 0.5.

  8. 8.(F)₁₆ in binary?Show answer

    1111.

Best order to study it

  1. Encoding: why codes are needed; ASCII values and encoding a word.
  2. ISCII and Unicode; UTF-8 and UTF-32 sizes.
  3. Number systems: bases, symbols, positions, positional values.
  4. Any base to decimal by expansion.
  5. Decimal to any base: division for integers, multiplication for fractions.
  6. Binary to octal and hex by grouping; octal to hex through binary.
  7. Applications of hex; check answers with Python.

Quick revision checklist

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

  • Encoding maps each character to a code, stored in binary.
  • ASCII: 7 bits, 128 characters, English only; 'A' 65, 'a' 97, '0' 48.
  • ISCII: 8 bits, 256 codes, ASCII plus Indian aksharas.
  • Unicode: one code point for every character; superset of ASCII; UTF-8 1-4 bytes, UTF-32 4 bytes.
  • Bases: binary 2, octal 8, decimal 10, hex 16 (A-F = 10-15).
  • To decimal: sum of digit × base^position.
  • From decimal: divide and read remainders upwards; fractions multiply and read downwards.
  • 3 bits per octal digit, 4 bits per hex digit; group from the point.

Encoding Schemes and Number System: frequently asked questions

Is UTF-16 in the Class 11 syllabus?

The 2026-27 syllabus names Unicode with UTF-8 and UTF-32. NCERT mentions UTF-16 as another common encoding; knowing that it uses 2 or 4 bytes is enough.

Are fractional conversions in the syllabus?

The syllabus says 'conversion between number systems' and NCERT section 2.3.4 covers numbers with a fractional part, so be ready to convert fractions too, for example (0.625)₁₀ to binary or (605.12)₈ to decimal.

How do I convert octal to hexadecimal directly?

Go through binary: write each octal digit as 3 bits, then regroup the bits into fours from the point and write each group as a hex digit.

Why does a fraction sometimes never end in binary?

Some decimal fractions such as 0.1 cannot be written exactly with powers of 2, so the multiplication never reaches 0. Stop when the digits start repeating or after a set number of steps and say the answer is approximate.

How can I check my conversion answers?

Convert back to decimal, or use Python: bin(156), oct(156), hex(156) give '0b10011100', '0o234', '0x9c', and int('9C', 16) gives 156.

Based on: CBSE Computer Science (083) syllabus, Class XI 2026-27; NCERT Computer Science, Textbook for Class XI, Chapter 2 Encoding Schemes and Number System (Reprint 2026-27)