Decimal to Binary, Octal and Hexadecimal Conversion Class 11 CBSE Computer Science
Class 11 · Computer Science
Decimal to Binary, Octal and Hexadecimal Conversion (CBSE Class 11 Computer Science)
The Decimal Number System is the most commonly used number system in daily life. However, computers use Binary internally, while programmers also use Octal and Hexadecimal for efficient representation of data. Therefore, it is important to know how to convert Decimal numbers into other number systems.
Learning Objectives
- Convert Decimal to Binary.
- Convert Decimal to Octal.
- Convert Decimal to Hexadecimal.
- Understand the repeated division method.
- Practice solved examples.
General Rule for Decimal Conversion
To convert a Decimal number into another number system:
- Divide the number by the base of the required number system.
- Write the remainder.
- Repeat until the quotient becomes zero.
- Read the remainders from bottom to top.
Decimal to Binary Conversion
Binary has a base of 2. Therefore, repeatedly divide the Decimal number by 2 and note the remainders.
Steps
- Divide the Decimal number by 2.
- Write the remainder.
- Continue dividing the quotient by 2.
- Stop when the quotient becomes 0.
- Read the remainders from bottom to top.
Example 1
Convert 25₁₀ into Binary.
25 ÷ 2 = 12 R 1
12 ÷ 2 = 6 R 0
6 ÷ 2 = 3 R 0
3 ÷ 2 = 1 R 1
1 ÷ 2 = 0 R 1
Reading from bottom to top:
25₁₀ = 11001₂
Example 2
Convert 45₁₀ into Binary.
45 ÷ 2 = 22 R1
22 ÷ 2 = 11 R0
11 ÷ 2 = 5 R1
5 ÷ 2 = 2 R1
2 ÷ 2 = 1 R0
1 ÷ 2 = 0 R1
45₁₀ = 101101₂
Decimal to Octal Conversion
Octal has a base of 8. Therefore, repeatedly divide the Decimal number by 8.
Steps
- Divide by 8.
- Write the remainder.
- Repeat until the quotient becomes zero.
- Read the remainders from bottom to top.
Example 1
Convert 125₁₀ into Octal.
125 ÷ 8 = 15 R5
15 ÷ 8 = 1 R7
1 ÷ 8 = 0 R1
125₁₀ = 175₈
Example 2
Convert 250₁₀ into Octal.
250 ÷ 8 = 31 R2
31 ÷ 8 = 3 R7
3 ÷ 8 = 0 R3
250₁₀ = 372₈
Decimal to Hexadecimal Conversion
Hexadecimal has a base of 16. Therefore, repeatedly divide the Decimal number by 16.
Hexadecimal Digits
| Decimal | Hexadecimal |
|---|---|
| 10 | A |
| 11 | B |
| 12 | C |
| 13 | D |
| 14 | E |
| 15 | F |
Example 1
Convert 255₁₀ into Hexadecimal.
255 ÷ 16 = 15 R15(F)
15 ÷ 16 = 0 R15(F)
255₁₀ = FF₁₆
Example 2
Convert 687₁₀ into Hexadecimal.
687 ÷ 16 = 42 R15(F)
42 ÷ 16 = 2 R10(A)
2 ÷ 16 = 0 R2
687₁₀ = 2AF₁₆
Shortcut Tips
| Target Number System | Divide By |
|---|---|
| Binary | 2 |
| Octal | 8 |
| Hexadecimal | 16 |
Always read the remainders from bottom to top.
Comparison of Conversion Methods
| Conversion | Base Used | Method |
|---|---|---|
| Decimal → Binary | 2 | Repeated Division |
| Decimal → Octal | 8 | Repeated Division |
| Decimal → Hexadecimal | 16 | Repeated Division |
Real-Life Example
Imagine you have a stack of books:
- If you arrange them in groups of 2, you are following the Binary conversion method.
- If you arrange them in groups of 8, you are following the Octal conversion method.
- If you arrange them in groups of 16, you are following the Hexadecimal conversion method.
- The leftover books (remainders) are noted at each step and finally read in reverse order.
Common Errors
- Reading remainders from top to bottom instead of bottom to top.
- Using the wrong divisor.
- Forgetting to convert 10–15 into A–F for hexadecimal.
- Stopping the division before the quotient becomes zero.
- Writing hexadecimal digits greater than F.
Exam Tips
- Binary conversion uses repeated division by 2.
- Octal conversion uses repeated division by 8.
- Hexadecimal conversion uses repeated division by 16.
- Always write the remainders in reverse order.
- Memorize hexadecimal digits A–F.
- Practice at least five conversion problems from each number system.
Frequently Asked Questions (FAQs)
1. Which method is used to convert Decimal into Binary?
The repeated division by 2 method.
2. Why are remainders read from bottom to top?
Because the first remainder represents the least significant digit, while the last remainder represents the most significant digit.
3. Which divisor is used for Octal conversion?
The divisor is 8.
4. Which divisor is used for Hexadecimal conversion?
The divisor is 16.
5. What does hexadecimal digit F represent?
F represents the decimal value 15.
Summary
- Decimal numbers are converted using the repeated division method.
- Divide by 2 for Binary, 8 for Octal, and 16 for Hexadecimal.
- Record the remainder at each step.
- Read the remainders from bottom to top to obtain the converted number.
- Hexadecimal uses digits 0–9 and letters A–F.
- Regular practice is essential to master number system conversions.