A Number System is a method of representing numbers using specific digits and rules. In computer science, number systems are very important because computers work internally with binary numbers (0 and 1).
In this lesson, students will learn about the major number systems used in computing, their bases, digits, and how to convert numbers from one system to another.
A number system is a systematic way of representing numerical values.
In our daily life, we normally use the Decimal Number System, which contains ten digits from 0 to 9.
Computers, however, use the Binary Number System, which contains only two digits:
0 and 1
Different number systems are used for different purposes in computer science and digital electronics.
The four commonly used number systems are:
| Number System | Base | Digits Used |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Decimal | 10 | 0–9 |
| Hexadecimal | 16 | 0–9, A–F |
The Decimal Number System is the number system we commonly use in everyday life.
It has a base of 10 and uses ten digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Each position of a digit has a value based on powers of 10.
572
This can be represented as:
5 × 10² + 7 × 10¹ + 2 × 10⁰
= 500 + 70 + 2
= 572
The Binary Number System is the fundamental number system used by computers.
It has a base of 2 and uses only:
0 and 1
Each binary digit is called a bit.
Binary number:
1011₂
Its decimal value is:
1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰
= 8 + 0 + 2 + 1
= 11₁₀
Therefore:
1011₂ = 11₁₀
The Octal Number System has a base of 8.
It uses eight digits:
0, 1, 2, 3, 4, 5, 6, 7
Digits 8 and 9 are not used in the octal system.
245₈
Its decimal value is:
2 × 8² + 4 × 8¹ + 5 × 8⁰
= 128 + 32 + 5
= 165₁₀
The Hexadecimal Number System has a base of 16.
It uses:
0–9 and A–F
Here:
2A₁₆
Its decimal value is:
2 × 16¹ + A × 16⁰
= 32 + 10
= 42₁₀
Therefore:
2A₁₆ = 42₁₀
Number conversion means changing a number from one number system to another without changing its actual value.
Common conversions include:
To convert a decimal number into binary, repeatedly divide the number by 2 and record the remainders.
25 ÷ 2 = 12 remainder 1
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Read the remainders from bottom to top:
25₁₀ = 11001₂
Multiply each binary digit by the corresponding power of 2.
Convert 1101₂ into decimal.
1 × 2³ + 1 × 2² + 0 × 2¹ + 1 × 2⁰
= 8 + 4 + 0 + 1
= 13
Therefore:
1101₂ = 13₁₀
To convert binary into octal, divide the binary digits into groups of three digits, starting from the right.
101101₂
Group the digits:
101 | 101
101₂ = 5
101₂ = 5
Therefore:
101101₂ = 55₈
To convert binary into hexadecimal, group the binary digits into groups of four, starting from the right.
10101111₂
Group:
1010 | 1111
1010₂ = A
1111₂ = F
Therefore:
10101111₂ = AF₁₆
Number systems are important because they help computers represent and process information.
Used internally by computers and digital electronic systems.
Used by people for everyday calculations and data representation.
Can provide a shorter representation of binary values and has been used in some computing applications.
Widely used in programming, memory addresses, machine-level representation, color codes, and debugging because one hexadecimal digit represents four binary bits.
A Bit is the smallest unit of digital data and can have a value of 0 or 1.
A group of 8 bits is called a Byte.
For example:
1 Byte = 8 Bits
Common data storage units include:
Leave a Reply