Chapter 02: Encoding Schemes and Number System
2.1 Introduction
Computers are electronic machines that process data internally in a form that is different from human-readable form. Humans commonly use numbers, alphabets, symbols, images, and sounds, whereas computers understand and process information only in the form of binary digits (0 and 1).
To enable computers to store, process, and communicate different types of data, suitable encoding schemes and number systems are used.
According to the CBSE Class 11 Computer Science syllabus, this chapter introduces students to:
- The concept of number systems
- The need for different number systems
- The role of encoding schemes in representing data
Why Encoding and Number Systems Are Needed
CBSE highlights that computers work on electronic circuits that have only two stable states:
- ON
- OFF
These two states are represented using:
- 1 (ON)
- 0 (OFF)
Because of this limitation:
- All data must be converted into binary form
- Numbers, characters, and symbols must be encoded
- Arithmetic and logical operations must use binary representation
Thus, encoding schemes and number systems form the foundation of computer operations.
Data Representation in Computers
Data in computers can be of different types, such as:
- Numbers
- Characters (letters, digits, symbols)
- Images
- Audio
- Video
Before processing, all these types of data are converted into binary form using appropriate encoding methods.
📌 CBSE Exam Point A computer understands only binary data (0s and 1s).
What Is a Number System
A number system is a way of representing numbers using a set of digits and a base (radix).
Each number system is defined by:
- A base
- A set of digits
- A positional value system
Humans commonly use the decimal number system, while computers use the binary number system.
Need for Different Number Systems
Different number systems are used because:
- Binary is suitable for electronic circuits
- Decimal is convenient for human understanding
- Octal and hexadecimal provide compact representation of binary numbers
- Conversions are needed for input, processing, and output
CBSE expects students to understand why multiple number systems exist and how they are related.
Encoding Schemes (Conceptual Overview)
An encoding scheme is a method of representing characters, digits, and symbols in binary form.
Examples (to be discussed later in the chapter or course):
- ASCII
- Unicode
Encoding schemes ensure:
- Standard representation of characters
- Compatibility between systems
- Accurate data communication
At this stage, CBSE introduces encoding conceptually before going into details.
Relationship Between Encoding and Number Systems
- Number systems define how numbers are represented
- Encoding schemes define how characters and symbols are represented
- Both rely on binary representation
Thus, encoding schemes and number systems together enable computers to:
- Store data
- Process data
- Exchange data accurately
Importance of This Chapter (CBSE Perspective)
CBSE includes this chapter to help students:
- Understand the internal working of computers
- Learn number system conversions (important for exams)
- Build a foundation for programming and data representation
- Develop logical thinking skills
This chapter is highly scoring and frequently tested in:
- Board exams
- MCQs
- Conversion problems
Key Points to Remember (NCERT-Oriented)
- Computers use binary number system
- Humans use decimal number system
- Encoding converts data into binary form
- Number systems define representation of numbers
- Encoding schemes enable representation of characters
2.2 Number System
A computer processes all data internally using numbers, specifically in binary form. To understand how computers store and manipulate numbers, it is essential to study different number systems.
According to the CBSE Class 11 Computer Science syllabus, a number system is a system of representing numbers using a specific set of symbols (digits) and a base (radix).
Key Terms Related to Number Systems
Before studying different number systems, it is important to understand the following terms:
Digit
A digit is a single symbol used to represent a number in a number system.
Examples:
- Decimal digits: 0 to 9
- Binary digits: 0 and 1
Base (Radix)
The base of a number system is the total number of unique digits it uses.
Examples:
- Decimal → Base 10
- Binary → Base 2
📌 CBSE Exam Point Base of a number system determines the place value of digits.
Positional Value System
In a positional number system:
- The value of a digit depends on its position
- Each position has a weight which is a power of the base
Example (Decimal):
- 345 = (3 × 10²) + (4 × 10¹) + (5 × 10⁰)
Types of Number Systems (CBSE Scope)
CBSE focuses on the following four number systems:
- Decimal Number System
- Binary Number System
- Octal Number System
- Hexadecimal Number System
Each system differs in base, digits used, and application.
2.2.1 Decimal Number System
The decimal number system is the most commonly used number system by humans.
Characteristics of Decimal Number System
- Base (Radix): 10
- Digits used: 0 to 9
- Positional value based on powers of 10
Example
Decimal number: 472
Expanded form:
- (4 × 10²) + (7 × 10¹) + (2 × 10⁰)
Use of Decimal Number System
- Used in daily life
- Easy for human understanding
- Not suitable for direct computer processing
📌 CBSE Concept Check Computers do not use decimal system internally.
2.2.2 Binary Number System
The binary number system is the fundamental number system used by computers.
Characteristics of Binary Number System
- Base (Radix): 2
- Digits used: 0 and 1
- Positional value based on powers of 2
Why Computers Use Binary System
Computers use binary because:
- Electronic circuits have two states (ON/OFF)
- Binary representation is reliable and simple
- Reduces chances of errors in processing
Example
Binary number: 1011₂
Expanded form:
- (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰)
Binary Digit (Bit)
- A bit is the smallest unit of data
- Represents either 0 or 1
- Multiple bits form meaningful data
📌 CBSE Exam Point Binary system uses only two digits: 0 and 1.
2.2.3 Octal Number System
The octal number system is used as a shorthand representation of binary numbers.
Characteristics of Octal Number System
- Base (Radix): 8
- Digits used: 0 to 7
- Each octal digit represents 3 binary digits
Example
Octal number: 345₈
Expanded form:
- (3 × 8²) + (4 × 8¹) + (5 × 8⁰)
Use of Octal Number System
- Easier to read and write than binary
- Used in early computer systems
- Helpful in grouping binary digits
📌 CBSE Exam Point 1 octal digit = 3 binary bits.
2.2.4 Hexadecimal Number System
The hexadecimal number system provides a compact way to represent large binary numbers.
Characteristics of Hexadecimal Number System
- Base (Radix): 16
Digits used:
- 0–9 (values 0 to 9)
- A–F (values 10 to 15)
Hexadecimal Digits
| Hex Digit | Decimal Value |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Example
Hexadecimal number: 2A₁₆
Expanded form:
- (2 × 16¹) + (10 × 16⁰)
Use of Hexadecimal Number System
- Compact representation of binary
- Widely used in memory addresses
- Used in debugging and programming
📌 CBSE Exam Point 1 hexadecimal digit = 4 binary bits.
Comparison of Number Systems
| Number System | Base | Digits Used |
|---|---|---|
| Decimal | 10 | 0–9 |
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Hexadecimal | 16 | 0–9, A–F |
Why Multiple Number Systems Are Used
- Decimal → Human convenience
- Binary → Computer processing
- Octal → Shorter binary representation
- Hexadecimal → Compact and readable binary form
Each system has a specific role in computing.
Key Points to Remember (NCERT-Oriented)
- A number system has digits and a base
- Decimal is base 10
- Binary is base 2 and used by computers
- Octal is base 8 and groups binary digits
- Hexadecimal is base 16 and uses A–F
- Positional value depends on base
2.3 Conversion between Number Systems
Since computers use the binary number system, while humans commonly use the decimal number system, it is often necessary to convert numbers from one number system to another. CBSE gives very high importance to number system conversions, and this section is frequently tested in exams.
Conversions help in:
- Understanding how data is processed internally
- Translating user input into computer-readable form
- Representing binary data in compact forms (octal, hexadecimal)
Types of Conversions in CBSE Syllabus
CBSE Class 11 focuses on the following conversions:
- Decimal → Binary
- Binary → Decimal
- Binary ↔ Octal
- Binary ↔ Hexadecimal
2.3.1 Decimal to Binary Conversion
Method: Repeated Division by 2
In this method:
- Divide the decimal number by 2 repeatedly
- Note the remainder at each step
- Read the remainders from bottom to top
Example: Convert (25)₁₀ 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 |
Reading remainders bottom to top:
(25)₁₀ = (11001)₂
📌 CBSE Exam Tip Always write remainders in reverse order.
2.3.2 Binary to Decimal Conversion
Method: Positional Weight Method
Steps:
- Write positional weights (powers of 2)
- Multiply each bit by its positional value
- Add all the results
Example: Convert (10110)₂ to Decimal
| Bit | Position | Value |
|---|---|---|
| 1 | 2⁴ | 16 |
| 0 | 2³ | 0 |
| 1 | 2² | 4 |
| 1 | 2¹ | 2 |
| 0 | 2⁰ | 0 |
Sum = 16 + 0 + 4 + 2 + 0 = 22
(10110)₂ = (22)₁₀
2.3.3 Binary to Octal Conversion
Method: Grouping Binary Digits (3-bit Groups)
Rules:
- Group binary digits in sets of 3 from right to left
- Add leading zeros if required
- Convert each group to its octal equivalent
Binary to Octal Mapping Table
| Binary | Octal |
|---|---|
| 000 | 0 |
| 001 | 1 |
| 010 | 2 |
| 011 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
Example: Convert (110101)₂ to Octal
Grouping:
110 101
Conversion:
- 110 → 6
- 101 → 5
(110101)₂ = (65)₈
📌 CBSE Exam Point 1 octal digit represents 3 binary bits.
2.3.4 Octal to Binary Conversion
Method: Replace Each Octal Digit with 3 Binary Bits
Example: Convert (572)₈ to Binary
| Octal Digit | Binary |
|---|---|
| 5 | 101 |
| 7 | 111 |
| 2 | 010 |
Result:
101111010
(572)₈ = (101111010)₂
2.3.5 Binary to Hexadecimal Conversion
Method: Grouping Binary Digits (4-bit Groups)
Rules:
- Group binary digits in sets of 4 from right to left
- Add leading zeros if required
- Convert each group to hexadecimal
Binary to Hexadecimal Mapping Table
| Binary | Hex |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0010 | 2 |
| 0011 | 3 |
| 0100 | 4 |
| 0101 | 5 |
| 0110 | 6 |
| 0111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
Example: Convert (10111100)₂ to Hexadecimal
Grouping:
1011 1100
Conversion:
- 1011 → B
- 1100 → C
(10111100)₂ = (BC)₁₆
📌 CBSE Exam Point 1 hexadecimal digit represents 4 binary bits.
2.3.6 Hexadecimal to Binary Conversion
Method: Replace Each Hex Digit with 4 Binary Bits
Example: Convert (3A)₁₆ to Binary
| Hex Digit | Binary |
|---|---|
| 3 | 0011 |
| A | 1010 |
Result:
00111010
(3A)₁₆ = (00111010)₂
Direct Conversion Rule (Important for Exams)
CBSE prefers:
- Decimal ↔ Binary using division/positional methods
- Binary ↔ Octal / Hexadecimal using grouping
- Avoid direct Decimal ↔ Octal/Hex unless via binary
📌 CBSE Exam Strategy Always show steps to get full marks.
Summary Table: Conversion Methods
| Conversion | Method |
|---|---|
| Decimal → Binary | Repeated division by 2 |
| Binary → Decimal | Positional weight |
| Binary → Octal | Group 3 bits |
| Octal → Binary | Replace with 3 bits |
| Binary → Hex | Group 4 bits |
| Hex → Binary | Replace with 4 bits |
Key Points to Remember (NCERT-Oriented)
- Binary is central to all conversions
- Grouping method is fastest and safest
- Always write base/subscript in answers
- Show working steps clearly
- Binary ↔ Octal (3 bits), Binary ↔ Hex (4 bits)