Encoding Schemes and Number Systems — NCERT Exercise Solutions for Class 11 Computer Science
Welcome to the complete NCERT exercise solutions for CBSE Class 11 Computer Science Chapter 2: Encoding Schemes and Number Systems. Every question from the NCERT textbook is answered below with detailed, step-by-step working. Conversions are shown with full steps so you can follow the method and apply it to any similar problem in your exams.
How to Use These Solutions
1. Try each question yourself first — work through the conversion using the method taught in class before checking the solution. 2. Follow every step — conversion questions carry step marks. Understanding the method matters more than the final answer. 3. Verify by reverse conversion — after finding the answer, convert it back to the original base to confirm correctness. 4. Practice variations — once you understand the method, try converting different numbers using the same approach.
Key Concepts — Quick Review
Before reading the solutions, quickly review the core concepts:
- Decimal (base 10): Digits 0-9. Our everyday number system.
- Binary (base 2): Digits 0-1. The language of computers.
- Octal (base 8): Digits 0-7. 3 binary digits = 1 octal digit.
- Hexadecimal (base 16): Digits 0-9, A-F. 4 binary digits = 1 hex digit.
- Decimal to other bases: Divide repeatedly by the base, read remainders bottom-to-top.
- Other bases to decimal: Multiply each digit by base^position, sum all.
- Binary to Octal: Group into 3-bit groups from right.
- Octal to Binary: Replace each octal digit with 3-bit binary.
- Binary to Hex: Group into 4-bit groups from right.
- Hex to Binary: Replace each hex digit with 4-bit binary.
- ASCII: 7-bit, 128 characters, English only. Key: Space=32, '0'=48, 'A'=65, 'a'=97.
- ISCII: 8-bit, 256 characters, Indian scripts.
- Unicode: Universal, supports all world scripts. Encoded as UTF-8 (1-4 bytes), UTF-16 (2-4 bytes), UTF-32 (4 bytes).
Exercise Questions and Answers
Q1. Convert the following decimal numbers to binary:
(a) 25 (b) 57 (c) 100 (d) 128
(a) Convert 25 (decimal) to binary:
| Division | Quotient | Remainder |
|---|---|---|
| 25 / 2 | 12 | 1 |
| 12 / 2 | 6 | 0 |
| 6 / 2 | 3 | 0 |
| 3 / 2 | 1 | 1 |
| 1 / 2 | 0 | 1 |
Read remainders from bottom to top: 11001
(b) Convert 57 (decimal) to binary:
| Division | Quotient | Remainder |
|---|---|---|
| 57 / 2 | 28 | 1 |
| 28 / 2 | 14 | 0 |
| 14 / 2 | 7 | 0 |
| 7 / 2 | 3 | 1 |
| 3 / 2 | 1 | 1 |
| 1 / 2 | 0 | 1 |
Read remainders from bottom to top: 111001
(c) Convert 100 (decimal) to binary:
| Division | Quotient | Remainder |
|---|---|---|
| 100 / 2 | 50 | 0 |
| 50 / 2 | 25 | 0 |
| 25 / 2 | 12 | 1 |
| 12 / 2 | 6 | 0 |
| 6 / 2 | 3 | 0 |
| 3 / 2 | 1 | 1 |
| 1 / 2 | 0 | 1 |
Read remainders from bottom to top: 1100100
(d) Convert 128 (decimal) to binary:
| Division | Quotient | Remainder |
|---|---|---|
| 128 / 2 | 64 | 0 |
| 64 / 2 | 32 | 0 |
| 32 / 2 | 16 | 0 |
| 16 / 2 | 8 | 0 |
| 8 / 2 | 4 | 0 |
| 4 / 2 | 2 | 0 |
| 2 / 2 | 1 | 0 |
| 1 / 2 | 0 | 1 |
Read remainders from bottom to top: 10000000
Q2. Convert the following binary numbers to decimal:
(a) 1101 (b) 10110 (c) 110011 (d) 11111111
(a) Convert 1101 (binary) to decimal:
1 x 2^3 = 1 x 8 = 8 1 x 2^2 = 1 x 4 = 4 0 x 2^1 = 0 x 2 = 0 1 x 2^0 = 1 x 1 = 1
Total = 8 + 4 + 0 + 1 = 13
(b) Convert 10110 (binary) to decimal:
1 x 2^4 = 1 x 16 = 16 0 x 2^3 = 0 x 8 = 0 1 x 2^2 = 1 x 4 = 4 1 x 2^1 = 1 x 2 = 2 0 x 2^0 = 0 x 1 = 0
Total = 16 + 0 + 4 + 2 + 0 = 22
(c) Convert 110011 (binary) to decimal:
1 x 2^5 = 1 x 32 = 32 1 x 2^4 = 1 x 16 = 16 0 x 2^3 = 0 x 8 = 0 0 x 2^2 = 0 x 4 = 0 1 x 2^1 = 1 x 2 = 2 1 x 2^0 = 1 x 1 = 1
Total = 32 + 16 + 0 + 0 + 2 + 1 = 51
(d) Convert 11111111 (binary) to decimal:
1 x 2^7 = 128 1 x 2^6 = 64 1 x 2^5 = 32 1 x 2^4 = 16 1 x 2^3 = 8 1 x 2^2 = 4 1 x 2^1 = 2 1 x 2^0 = 1
Total = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
Q3. Convert the following decimal numbers to hexadecimal:
(a) 255 (b) 756 (c) 1000
(a) Convert 255 (decimal) to hexadecimal:
| Division | Quotient | Remainder |
|---|---|---|
| 255 / 16 | 15 | 15 (F) |
| 15 / 16 | 0 | 15 (F) |
Read remainders from bottom to top: FF
(b) Convert 756 (decimal) to hexadecimal:
| Division | Quotient | Remainder |
|---|---|---|
| 756 / 16 | 47 | 4 |
| 47 / 16 | 2 | 15 (F) |
| 2 / 16 | 0 | 2 |
Read remainders from bottom to top: 2F4
(c) Convert 1000 (decimal) to hexadecimal:
| Division | Quotient | Remainder |
|---|---|---|
| 1000 / 16 | 62 | 8 |
| 62 / 16 | 3 | 14 (E) |
| 3 / 16 | 0 | 3 |
Read remainders from bottom to top: 3E8
Q4. Convert the following hexadecimal numbers to decimal:
(a) 1A3 (b) FF (c) 2B
(a) Convert 1A3 (hexadecimal) to decimal:
1 x 16^2 = 1 x 256 = 256 A(10) x 16^1 = 10 x 16 = 160 3 x 16^0 = 3 x 1 = 3
Total = 256 + 160 + 3 = 419
1A3 (hexadecimal) = 419 (decimal)
(b) Convert FF (hexadecimal) to decimal:
F(15) x 16^1 = 15 x 16 = 240 F(15) x 16^0 = 15 x 1 = 15
Total = 240 + 15 = 255
FF (hexadecimal) = 255 (decimal)
(c) Convert 2B (hexadecimal) to decimal:
2 x 16^1 = 2 x 16 = 32 B(11) x 16^0 = 11 x 1 = 11
Total = 32 + 11 = 43
2B (hexadecimal) = 43 (decimal)
Q5. Convert the following decimal numbers to octal:
(a) 156 (b) 100 (c) 255
(a) Convert 156 (decimal) to octal:
| Division | Quotient | Remainder |
|---|---|---|
| 156 / 8 | 19 | 4 |
| 19 / 8 | 2 | 3 |
| 2 / 8 | 0 | 2 |
Read remainders from bottom to top: 234
(b) Convert 100 (decimal) to octal:
| Division | Quotient | Remainder |
|---|---|---|
| 100 / 8 | 12 | 4 |
| 12 / 8 | 1 | 4 |
| 1 / 8 | 0 | 1 |
Read remainders from bottom to top: 144
(c) Convert 255 (decimal) to octal:
| Division | Quotient | Remainder |
|---|---|---|
| 255 / 8 | 31 | 7 |
| 31 / 8 | 3 | 7 |
| 3 / 8 | 0 | 3 |
Read remainders from bottom to top: 377
Q6. Convert the following binary numbers to octal and hexadecimal:
(a) 110101 (b) 10111001
(a) Convert 110101 (binary) to octal:
Step 2: Convert each group: 110 = 6, 101 = 5 Step 3: Combine: 65
| Step 1: Group into sets of 3 bits from the right: 110 | 101 |
|---|
(b) Convert 10111001 (binary) to octal:
Step 2: Convert each group: 010 = 2, 111 = 7, 001 = 1 Step 3: Combine: 271
| Step 1: Group into sets of 3 bits from the right: 010 | 111 | 001 (added leading zero) |
|---|
Q7. What is ASCII? Explain with examples.
ASCII stands for American Standard Code for Information Interchange. It is a character encoding standard developed in 1963 that uses 7 bits to represent each character, allowing a total of 128 characters (2^7 = 128). ASCII was designed for the English language and includes uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), punctuation marks, control characters (like newline, tab), and special symbols.
Important ASCII values:
- Space = 32
- Digits '0' to '9' = 48 to 57
- Uppercase 'A' to 'Z' = 65 to 90
- Lowercase 'a' to 'z' = 97 to 122
Example 1: The letter 'A' has the ASCII value 65. In binary, 65 = 1000001. So the computer stores 'A' as the 7-bit pattern 1000001.
Example 2: The word "Hi" is stored as:
- H = ASCII 72 = binary 1001000
- i = ASCII 105 = binary 1101001
- "Hi" = 1001000 1101001 (14 bits)
Limitations of ASCII:
- Supports only 128 characters, which is sufficient for English but not for other languages.
- Cannot represent Indian scripts, Chinese characters, Arabic, or other non-Latin scripts.
- Extended ASCII (8-bit, 256 characters) partially addresses this but is still limited.
Q8. Differentiate between ASCII and Unicode.
| Basis | ASCII | Unicode |
|---|---|---|
| Full Form | American Standard Code for Information Interchange | Universal Coded Character Set |
| Bits per character | 7 bits (fixed) | 8 to 32 bits (variable in UTF-8) |
| Number of characters | 128 | Over 149,000 |
| Language support | English only | All world languages and scripts |
| Year introduced | 1963 | 1991 |
| Backward compatibility | N/A | First 128 code points match ASCII exactly |
| Indian language support | No | Yes — Devanagari, Tamil, Bengali, Telugu, and all others |
| Emoji support | No | Yes |
| Encoding formats | Single format (7-bit) | UTF-8, UTF-16, UTF-32 |
| Usage today | Legacy systems, limited use | Standard for web, operating systems, and applications |
| Memory efficiency | Very efficient (7 bits per char) | Variable — 1 byte for ASCII chars, up to 4 bytes for others |
Why Unicode replaced ASCII: ASCII could only represent English (128 characters), making it impossible to exchange text in Hindi, Tamil, Chinese, Arabic, or any other language. Unicode was created as a single universal standard that assigns a unique code point to every character in every script, enabling global multilingual communication. The fact that UTF-8's first 128 code points match ASCII exactly ensures backward compatibility, so existing ASCII data works seamlessly with Unicode systems.
Q9. What is ISCII? How is it different from ASCII?
ISCII stands for Indian Script Code for Information Interchange. It is an 8-bit character encoding scheme developed in the 1980s by the Department of Electronics (now Ministry of Electronics and Information Technology), Government of India. ISCII was designed to enable computing in Indian languages.
Key features of ISCII:
- Uses 8 bits per character, allowing 256 characters (2^8 = 256).
- Supports major Indian scripts: Devanagari (Hindi, Marathi, Sanskrit), Bengali, Gujarati, Kannada, Malayalam, Oriya, Tamil, Telugu, and Punjabi (Gurmukhi).
- The first 128 codes are identical to ASCII, providing backward compatibility with English.
- ISCII uses a single code chart for all Indian scripts — the same code represents similar-sounding characters across different scripts.
Differences between ISCII and ASCII:
| Basis | ASCII | ISCII |
|---|---|---|
| Bits per character | 7 | 8 |
| Max characters | 128 | 256 |
| Language support | English only | Indian scripts + English |
| Indian language support | No | Yes |
| Backward compatible with ASCII | Yes (it is ASCII) | Yes (first 128 codes match ASCII) |
| Current usage | Legacy only | Rare — replaced by Unicode |
ISCII was an important milestone for Indian language computing, but it has been largely replaced by Unicode, which offers a single universal standard for all languages including Indian scripts.
Q10. Convert octal number 72 to binary and hexadecimal.
Step 1: Convert 72 (octal) to binary
Replace each octal digit with its 3-bit binary equivalent:
- 7 = 111
- 2 = 010
Combine: 111010
Related Chapters
- [CBSE Class 11 Computer Science Chapter 2 — Encoding Schemes and Number Systems (Chapter Guide)](/class/11/computer-science/cbse-encoding-number-systems)
- [CBSE Class 11 Computer Science Chapter 1 — Computer System (Chapter Guide)](/class/11/computer-science/cbse-computer-system)
- [Computer System — Exercise Solutions](/class/11/computer-science/solutions/cbse-computer-system-exercise-solutions)
