0% found this document useful (0 votes)
4 views12 pages

Number_Systems_Class11_Notes

The document provides an overview of number systems including Binary, Octal, Decimal, and Hexadecimal, explaining their bases, digits, and contexts of use. It details the conversion methods between these systems, emphasizing the importance of understanding these conversions for computer science. Each number system serves a specific purpose, with Decimal for humans, Binary for computers, and Octal and Hexadecimal as shorthand for binary representation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views12 pages

Number_Systems_Class11_Notes

The document provides an overview of number systems including Binary, Octal, Decimal, and Hexadecimal, explaining their bases, digits, and contexts of use. It details the conversion methods between these systems, emphasizing the importance of understanding these conversions for computer science. Each number system serves a specific purpose, with Decimal for humans, Binary for computers, and Octal and Hexadecimal as shorthand for binary representation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class 11 | Computer Science | Number Systems

NUMBER SYSTEMS
Binary • Octal • Decimal • Hexadecimal — and Conversions between Them

Figure 1: The four number systems used in computing

Page 1 of 12
Class 11 | Computer Science | Number Systems

1. Introduction to Number Systems


A number system is a systematic way of representing and working with numbers using a
defined set of symbols (digits) and rules. Every number system is built around a key idea
called the BASE or RADIX.

Key Term: Base (Radix)


The base of a number system is the total count of unique digits/symbols it uses to represent
numbers.
It also tells us the value by which the place value of each digit position is multiplied as we move
left.

In everyday life we use the Decimal system (base 10) because we count with ten fingers.
Computers, however, are built from electronic switches that can only be ON or OFF, so
they naturally use the Binary system (base 2). Octal and Hexadecimal systems exist as
convenient shorthand notations for binary, since they let long strings of 0s and 1s be
written far more compactly.

1.1 The Four Number Systems at a Glance


Number System Base (Radix) Digits Used Example
Binary 2 0, 1 (1100 1001)₂
Octal 8 0, 1, 2, 3, 4, 5, 6, 7 (3110)₈
0, 1, 2, 3, 4, 5, 6, 7, 8,
Decimal 10 (1609)₁₀
9
Hexadecimal 16 0-9, A, B, C, D, E, F (649)₁₆

Notice that in Hexadecimal, the letters A, B, C, D, E, F represent the decimal values 10,
11, 12, 13, 14 and 15 respectively, since a single digit position can only hold one symbol.

Hex Digit A B C D E F
Decimal
10 11 12 13 14 15
Value

Page 2 of 12
Class 11 | Computer Science | Number Systems

2. Why Do We Use Different Number Systems?


Each number system has a natural home — a context in which it is the most efficient or the most convenient
choice. Understanding WHERE each is used helps us understand WHY it exists.

2.1 Decimal Number System — for Humans


• It is the system we learn from childhood, based on counting with our 10 fingers.
• Used in everyday arithmetic, money, measurements, and all human-facing communication.
• Computers convert decimal input from users into binary internally, and convert results back to decimal for
display.

2.2 Binary Number System — for Computer Hardware


• Digital circuits are built from transistors that have exactly two stable states: ON (current flows) and OFF (no
current).
• These two states map perfectly onto the two binary digits 1 and 0, making binary the native language of all
digital electronics.
• Used for: representing data in RAM, processing in the CPU, logic gates, storage on disks (as
magnetic/optical states), and all internal computation.

2.3 Octal Number System — a Binary Shorthand


• Historically used in early computing (e.g., minicomputers such as the PDP-8) where words were built in
multiples of 3 bits.
• Each octal digit represents exactly 3 binary bits, so long binary strings can be written far more compactly
and with fewer errors.
• Still used today in Unix/Linux file permission codes, such as chmod 755.

2.4 Hexadecimal Number System — for Programmers


• Each hexadecimal digit represents exactly 4 binary bits (a 'nibble'), so it is an extremely compact and
readable way to represent binary data.
• Used for: memory addresses, debugging and machine-level programming, defining colours in web design
(e.g., #FF5733), MAC addresses, error codes, and encoding data such as hash values (e.g., MD5, SHA).
• A single byte (8 bits) is neatly written using just 2 hexadecimal digits — e.g., 11111111₂ = FF₁₆.

In short
Decimal → the language of humans.
Binary → the language of digital hardware.
Octal and Hexadecimal → convenient 'shorthand' bridges that make long binary values easy for humans to read,
write, and debug.

Page 3 of 12
Class 11 | Computer Science | Number Systems

3. Number System Conversions — Overview


There are twelve important conversions a Class 11 student should master: to and from Decimal for each of
Binary, Octal and Hexadecimal, plus direct conversions between Binary, Octal and Hexadecimal (which are
related through simple bit-grouping).

Figure 2: Conversion map between the four number systems

Page 4 of 12
Class 11 | Computer Science | Number Systems

4. Decimal ↔ Binary Conversion

4.1 Decimal to Binary (Division-by-2 Method)


Repeatedly divide the decimal number by 2, noting the remainder each time, until the quotient becomes 0. The
binary result is the remainders read from BOTTOM to TOP.

Example 1: Convert (43)₁₀ to Binary

43 ÷ 2 = 21 remainder 1
21 ÷ 2 = 10 remainder 1
10 ÷ 2 = 5 remainder 0
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Read remainders bottom-to-top: 1 0 1 0 1 1
Result: (43)₁₀ = (101011)₂

Example 2: Convert (156)₁₀ to Binary

156 ÷ 2 = 78 remainder 0
78 ÷ 2 = 39 remainder 0
39 ÷ 2 = 19 remainder 1
19 ÷ 2 = 9 remainder 1
9 ÷ 2 = 4 remainder 1
4 ÷ 2 = 2 remainder 0
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Read remainders bottom-to-top: 1 0 0 1 1 1 0 0
Result: (156)₁₀ = (10011100)₂

4.2 Binary to Decimal (Positional Weight Method)


Multiply each binary digit by 2 raised to the power of its position (counted from 0 on the right), then add up all
the products.

Example 1: Convert (101011)₂ to Decimal

(101011)₂ = 1×2⁵ + 0×2⁴ + 1×2³ + 0×2² + 1×2¹ + 1×2⁰


= 32 + 0 + 8 + 0 + 2 + 1
= 43
Result: (101011)₂ = (43)₁₀

Example 2: Convert (110110)₂ to Decimal

Page 5 of 12
Class 11 | Computer Science | Number Systems

(110110)₂ = 1×2⁵ + 1×2⁴ + 0×2³ + 1×2² + 1×2¹ + 0×2⁰


= 32 + 16 + 0 + 4 + 2 + 0
= 54
Result: (110110)₂ = (54)₁₀

Page 6 of 12
Class 11 | Computer Science | Number Systems

5. Decimal ↔ Octal Conversion

5.1 Decimal to Octal (Division-by-8 Method)


Repeatedly divide the decimal number by 8, noting each remainder, until the quotient becomes 0. Read the
remainders from bottom to top.

Example 1: Convert (378)₁₀ to Octal

378 ÷ 8 = 47 remainder 2
47 ÷ 8 = 5 remainder 7
5 ÷ 8 = 0 remainder 5
Read remainders bottom-to-top: 5 7 2
Result: (378)₁₀ = (572)₈

Example 2: Convert (1000)₁₀ to Octal

1000 ÷ 8 = 125 remainder 0


125 ÷ 8 = 15 remainder 5
15 ÷ 8 = 1 remainder 7
1 ÷ 8 = 0 remainder 1
Read remainders bottom-to-top: 1 7 5 0
Result: (1000)₁₀ = (1750)₈

5.2 Octal to Decimal (Positional Weight Method)


Multiply each octal digit by 8 raised to the power of its position (from 0 on the right), then sum the products.

Example 1: Convert (572)₈ to Decimal

(572)₈ = 5×8² + 7×8¹ + 2×8⁰


= 320 + 56 + 2
= 378
Result: (572)₈ = (378)₁₀

Example 2: Convert (246)₈ to Decimal

(246)₈ = 2×8² + 4×8¹ + 6×8⁰


= 128 + 32 + 6
= 166
Result: (246)₈ = (166)₁₀

Page 7 of 12
Class 11 | Computer Science | Number Systems

6. Decimal ↔ Hexadecimal Conversion

6.1 Decimal to Hexadecimal (Division-by-16 Method)


Repeatedly divide the decimal number by 16, noting each remainder (converting any remainder above 9 into a
letter A–F), until the quotient is 0.

Example 1: Convert (423)₁₀ to Hexadecimal

423 ÷ 16 = 26 remainder 7
26 ÷ 16 = 1 remainder 10 → A
1 ÷ 16 = 0 remainder 1
Read remainders bottom-to-top: 1 A 7
Result: (423)₁₀ = (1A7)₁₆

Example 2: Convert (2989)₁₀ to Hexadecimal

2989 ÷ 16 = 186 remainder 13 → D


186 ÷ 16 = 11 remainder 10 → A
11 ÷ 16 = 0 remainder 11 → B
Read remainders bottom-to-top: B A D
Result: (2989)₁₀ = (BAD)₁₆

6.2 Hexadecimal to Decimal (Positional Weight Method)


Multiply each hex digit (converting A-F to 10-15 first) by 16 raised to the power of its position, then sum the
products.

Example 1: Convert (1A7)₁₆ to Decimal

(1A7)₁₆ = 1×16² + 10×16¹ + 7×16⁰ (A = 10)


= 256 + 160 + 7
= 423
Result: (1A7)₁₆ = (423)₁₀

Example 2: Convert (2F3)₁₆ to Decimal

(2F3)₁₆ = 2×16² + 15×16¹ + 3×16⁰ (F = 15)


= 512 + 240 + 3
= 755
Result: (2F3)₁₆ = (755)₁₀

Page 8 of 12
Class 11 | Computer Science | Number Systems

7. Binary ↔ Octal Conversion


Since 8 = 2³, each octal digit corresponds to exactly 3 binary bits. This makes Binary ↔ Octal conversion a
simple grouping exercise — no arithmetic division is needed.

Octal
0 1 2 3 4 5 6 7
Digit

3-bit
000 001 010 011 100 101 110 111
Binary

7.1 Binary to Octal (Group in sets of 3 bits)


Starting from the right, group the binary digits into sets of 3 (pad with leading zeros on the left if needed), then
convert each group to its octal digit.

Example 1: Convert (101011)₂ to Octal

Group in 3s from the right: 101 011


101 = 5 011 = 3
Result: (101011)₂ = (53)₈

Example 2: Convert (11010110)₂ to Octal

8 bits — pad 2 zeros on the left: 011 010 110


011 = 3 010 = 2 110 = 6
Result: (11010110)₂ = (326)₈

7.2 Octal to Binary (Expand each digit to 3 bits)


Convert each octal digit individually into its 3-bit binary equivalent, then combine the groups in order.

Example 1: Convert (572)₈ to Binary

5 = 101 7 = 111 2 = 010


Combine: 101 111 010
Result: (572)₈ = (101111010)₂

Example 2: Convert (246)₈ to Binary

2 = 010 4 = 100 6 = 110


Combine: 010 100 110
Result: (246)₈ = (010100110)₂

Page 9 of 12
Class 11 | Computer Science | Number Systems

8. Binary ↔ Hexadecimal Conversion


Since 16 = 2⁴, each hexadecimal digit corresponds to exactly 4 binary bits (called a nibble). This again makes
conversion a simple grouping exercise.

Hex 0 1 2 3 4 5 6 7

4-bit
0000 0001 0010 0011 0100 0101 0110 0111
Binary

Hex 8 9 A B C D E F

4-bit
1000 1001 1010 1011 1100 1101 1110 1111
Binary

8.1 Binary to Hexadecimal (Group in sets of 4 bits)


Starting from the right, group the binary digits into sets of 4 (pad with leading zeros if needed), then convert each
group to its hex digit.

Example 1: Convert (10111011)₂ to Hexadecimal

Group in 4s from the right: 1011 1011


1011 = B 1011 = B
Result: (10111011)₂ = (BB)₁₆

Example 2: Convert (110101100)₂ to Hexadecimal

9 bits — pad 3 zeros on the left: 0001 1010 1100


0001 = 1 1010 = A 1100 = C
Result: (110101100)₂ = (1AC)₁₆

8.2 Hexadecimal to Binary (Expand each digit to 4 bits)


Convert each hex digit individually to its 4-bit binary equivalent, then combine the groups in order.

Example 1: Convert (1A7)₁₆ to Binary

1 = 0001 A = 1010 7 = 0111


Combine: 0001 1010 0111
Result: (1A7)₁₆ = (000110100111)₂

Example 2: Convert (2F3)₁₆ to Binary

2 = 0010 F = 1111 3 = 0011


Combine: 0010 1111 0011
Result: (2F3)₁₆ = (001011110011)₂

Page 10 of 12
Class 11 | Computer Science | Number Systems

9. Octal ↔ Hexadecimal Conversion


There is no direct place-value shortcut between Octal (base 8) and Hexadecimal (base 16), since neither is a
whole power of the other in a compatible way. The simplest reliable method is to convert VIA Binary as an
intermediate step.

9.1 Octal to Hexadecimal (via Binary)


Example 1: Convert (572)₈ to Hexadecimal

Step 1 — Octal to Binary: 5=101 7=111 2=010 → 101111010


Step 2 — Regroup in 4s from right (pad left): 0001 0111 1010
Step 3 — Binary to Hex: 0001=1 0111=7 1010=A
Result: (572)₈ = (17A)₁₆

Example 2: Convert (246)₈ to Hexadecimal

Step 1 — Octal to Binary: 2=010 4=100 6=110 → 010100110


Step 2 — Regroup in 4s from right (pad left): 0000 1010 0110
Step 3 — Binary to Hex: 0000=0 1010=A 0110=6
Result: (246)₈ = (0A6)₁₆

9.2 Hexadecimal to Octal (via Binary)


Example 1: Convert (1A7)₁₆ to Octal

Step 1 — Hex to Binary: 1=0001 A=1010 7=0111 → 000110100111


Step 2 — Regroup in 3s from right (pad left): 000 110 100 111
Step 3 — Binary to Octal: 000=0 110=6 100=4 111=7
Result: (1A7)₁₆ = (0647)₈

Example 2: Convert (2F3)₁₆ to Octal

Step 1 — Hex to Binary: 2=0010 F=1111 3=0011 → 001011110011


Step 2 — Regroup in 3s from right (pad left): 001 011 110 011
Step 3 — Binary to Octal: 001=1 011=3 110=6 011=3
Result: (2F3)₁₆ = (1363)₈

Page 11 of 12
Class 11 | Computer Science | Number Systems

10. Quick Revision Summary

Conversion Method

Decimal → Binary Divide repeatedly by 2; read remainders bottom to top

Binary → Decimal Multiply each bit by 2^(position); add the results

Decimal → Octal Divide repeatedly by 8; read remainders bottom to top

Octal → Decimal Multiply each digit by 8^(position); add the results

Decimal → Hexadecimal Divide repeatedly by 16; read remainders bottom to top

Hexadecimal → Decimal Multiply each digit by 16^(position); add the results

Binary → Octal Group bits in 3s from the right; convert each group

Octal → Binary Expand each digit into 3 bits; combine

Binary → Hexadecimal Group bits in 4s from the right; convert each group

Hexadecimal → Binary Expand each digit into 4 bits; combine

Octal → Hexadecimal Convert Octal → Binary → Hexadecimal

Hexadecimal → Octal Convert Hexadecimal → Binary → Octal

Remember
Always double-check by converting your final answer back to the original base — it should match the question.
When grouping bits for Octal (3 bits) or Hexadecimal (4 bits), always start grouping from the RIGHT and pad the
leftmost group with zeros if it is incomplete.

11. Practice Questions


• Convert (89)₁₀ to Binary, Octal and Hexadecimal.
• Convert (110101)₂ to Decimal, Octal and Hexadecimal.
• Convert (764)₈ to Binary, Decimal and Hexadecimal.
• Convert (3E9)₁₆ to Binary, Octal and Decimal.
• Explain, with one real-world example each, why Hexadecimal is preferred over Binary for representing
memory addresses, and why Octal was historically used for representing file permissions in Unix systems.

Page 12 of 12

You might also like