Study Guide
Number System Conversions, Binary, Octal, Hex, CBSE Class 11
Master number system conversions for CBSE Class 11 CS. Binary, octal, decimal, hexadecimal conversions with step-by-step examples and practice problems.
Number system conversions are one of the most scoring topics in CBSE Class 11 Computer Science. Once you understand the method, you can solve any conversion problem correctly. This guide covers all four number systems and every type of conversion with step-by-step examples.
The Four Number Systems
| Number System | Base | Digits Used | Example |
|---|---|---|---|
| Binary | 2 | 0, 1 | 1010 |
| Octal | 8 | 0-7 | 127 |
| Decimal | 10 | 0-9 | 255 |
| Hexadecimal | 16 | 0-9, A-F | 1A3F |
Hexadecimal Digit Values
| Hex Digit | Decimal Value |
|---|---|
| A | 10 |
| B | 11 |
| C | 12 |
| D | 13 |
| E | 14 |
| F | 15 |
Decimal to Binary Conversion
Method: Divide the decimal number by 2 repeatedly and note the remainders. Read the remainders from bottom to top.
Example: Convert 45 to binary
| Division | Quotient | Remainder |
|---|---|---|
| 45 / 2 | 22 | 1 |
| 22 / 2 | 11 | 0 |
| 11 / 2 | 5 | 1 |
| 5 / 2 | 2 | 1 |
| 2 / 2 | 1 | 0 |
| 1 / 2 | 0 | 1 |
Reading remainders from bottom to top: (45)₁₀ = (101101)₂
Decimal Fraction to Binary
Method: Multiply the fractional part by 2 repeatedly and note the integer parts. Read from top to bottom.
Example: Convert 0.625 to binary
| Multiplication | Result | Integer Part |
|---|---|---|
| 0.625 x 2 | 1.250 | 1 |
| 0.250 x 2 | 0.500 | 0 |
| 0.500 x 2 | 1.000 | 1 |
Reading from top to bottom: (0.625)₁₀ = (0.101)₂
Complete example: Convert 45.625 to binary
Integer part: 45 = 101101 Fractional part: 0.625 = 0.101
Result: (45.625)₁₀ = (101101.101)₂
Binary to Decimal Conversion
Method: Multiply each bit by its positional value (power of 2) and add all the results.
Example: Convert (101101)₂ to decimal
Position: 5 4 3 2 1 0
Bit: 1 0 1 1 0 1
Value: 2⁵ 2⁴ 2³ 2² 2¹ 2⁰
= 32 0 8 4 0 1
Sum = 32 + 0 + 8 + 4 + 0 + 1 = 45
(101101)₂ = (45)₁₀
Binary Fraction to Decimal
Example: Convert (0.101)₂ to decimal
Position: -1 -2 -3
Bit: 1 0 1
Value: 2⁻¹ 2⁻² 2⁻³
= 0.5 0.0 0.125
Sum = 0.5 + 0.0 + 0.125 = 0.625
(0.101)₂ = (0.625)₁₀
Decimal to Octal Conversion
Method: Divide by 8 repeatedly. Read remainders from bottom to top.
Example: Convert 345 to octal
| Division | Quotient | Remainder |
|---|---|---|
| 345 / 8 | 43 | 1 |
| 43 / 8 | 5 | 3 |
| 5 / 8 | 0 | 5 |
Reading from bottom to top: (345)₁₀ = (531)₈
Octal to Decimal Conversion
Method: Multiply each digit by its positional value (power of 8) and add.
Example: Convert (531)₈ to decimal
Position: 2 1 0
Digit: 5 3 1
Value: 8² 8¹ 8⁰
= 320 24 1
Sum = 320 + 24 + 1 = 345
(531)₈ = (345)₁₀
Decimal to Hexadecimal Conversion
Method: Divide by 16 repeatedly. Read remainders from bottom to top. Replace remainders 10-15 with A-F.
Example: Convert 748 to hexadecimal
| Division | Quotient | Remainder |
|---|---|---|
| 748 / 16 | 46 | 12 (C) |
| 46 / 16 | 2 | 14 (E) |
| 2 / 16 | 0 | 2 |
Reading from bottom to top: (748)₁₀ = (2EC)₁₆
Hexadecimal to Decimal Conversion
Method: Multiply each digit by its positional value (power of 16) and add.
Example: Convert (2EC)₁₆ to decimal
Position: 2 1 0
Digit: 2 E(14) C(12)
Value: 16² 16¹ 16⁰
= 512 224 12
Sum = 512 + 224 + 12 = 748
(2EC)₁₆ = (748)₁₀
Binary to Octal Conversion
Method: Group binary digits into sets of 3 (from right to left). Convert each group to its octal equivalent.
Example: Convert (101101011)₂ to octal
Group: 101 101 011
Octal: 5 5 3
(101101011)₂ = (553)₈
If the number of bits is not a multiple of 3, add leading zeros:
Example: Convert (11010)₂ to octal
Add leading zero: 011 010
Octal: 3 2
(11010)₂ = (32)₈
Octal to Binary Conversion
Method: Convert each octal digit to its 3-bit binary equivalent.
Example: Convert (753)₈ to binary
Octal: 7 5 3
Binary: 111 101 011
(753)₈ = (111101011)₂
| Octal | Binary |
|---|---|
| 0 | 000 |
| 1 | 001 |
| 2 | 010 |
| 3 | 011 |
| 4 | 100 |
| 5 | 101 |
| 6 | 110 |
| 7 | 111 |
Binary to Hexadecimal Conversion
Method: Group binary digits into sets of 4 (from right to left). Convert each group to its hex equivalent.
Example: Convert (110111011110)₂ to hexadecimal
Group: 1101 1101 1110
Hex: D D E
(110111011110)₂ = (DDE)₁₆
Hexadecimal to Binary Conversion
Method: Convert each hex digit to its 4-bit binary equivalent.
Example: Convert (3AF)₁₆ to binary
Hex: 3 A F
Binary: 0011 1010 1111
(3AF)₁₆ = (001110101111)₂
| Hex | Binary |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| A | 1010 |
| B | 1011 |
| C | 1100 |
| D | 1101 |
| E | 1110 |
| F | 1111 |
Octal to Hexadecimal (and vice versa)
For these conversions, use binary as an intermediate step:
Octal to Hex: Octal -> Binary -> Hexadecimal
Example: Convert (572)₈ to hexadecimal
Step 1: Octal to Binary
5 = 101, 7 = 111, 2 = 010
(572)₈ = (101111010)₂
Step 2: Binary to Hexadecimal (group in 4s from right)
0001 0111 1010
1 7 A
(572)₈ = (17A)₁₆
Binary Arithmetic
Binary Addition
The rules of binary addition:
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
Example: Add (1011)₂ and (1101)₂
1 1 1 1 (carry)
1 0 1 1
+ 1 1 0 1
-----------
1 1 0 0 0
(1011)₂ + (1101)₂ = (11000)₂
Verification: 11 + 13 = 24 and (11000)₂ = 16 + 8 = 24. Correct.
Binary Subtraction
Example: Subtract (0101)₂ from (1100)₂
1 1 0 0
- 0 1 0 1
-----------
0 1 1 1
(1100)₂ - (0101)₂ = (0111)₂
Verification: 12, 5 = 7 and (0111)₂ = 7. Correct.
Representation of Negative Numbers
1's Complement
Flip all bits (0 becomes 1, 1 becomes 0):
Number: 0 1 0 1 1
1's Complement: 1 0 1 0 0
2's Complement
Add 1 to the 1's complement:
Number: 0 1 0 1 1
1's Complement: 1 0 1 0 0
Add 1: + 0 0 0 0 1
-----------
2's Complement: 1 0 1 0 1
Exam tip: 2's complement is used to represent negative numbers in computers. The 2's complement of a number N is calculated as: 2's complement = 1's complement + 1
Practice Problems
Try these conversions yourself:
- Convert (156)₁₀ to binary
- Convert (10110110)₂ to decimal
- Convert (456)₈ to decimal
- Convert (1000)₁₀ to hexadecimal
- Convert (ABC)₁₆ to binary
- Convert (110100111)₂ to octal
- Convert (FF)₁₆ to decimal
- Add (1110)₂ and (1011)₂
- Find the 2's complement of (01101)₂
- Convert (0.75)₁₀ to binary
Answers:
- (10011100)₂
- (182)₁₀
- (302)₁₀
- (3E8)₁₆
- (101010111100)₂
- (647)₈
- (255)₁₀
- (11001)₂
- (10011)₂
- (0.11)₂
Quick Revision
- Decimal to any base: Divide by base, read remainders bottom to top
- Any base to decimal: Multiply each digit by positional power, then add
- Binary to Octal: Group bits in 3s from right
- Binary to Hex: Group bits in 4s from right
- Octal to Binary: Each octal digit = 3 binary bits
- Hex to Binary: Each hex digit = 4 binary bits
- 1's complement: Flip all bits
- 2's complement: 1's complement + 1, For fractional conversions: multiply by base for integer-to-fraction direction
Want to learn more?
Explore free chapter-wise notes with quizzes and code playground
Prefer watching over reading?
Subscribe for free.