Computer ScienceChapter 1: Computer Systems
1.2.1 Types of Number Systems
A number system
Explanation level
There are various types of number systems in mathematics. The four most common number system types are:
- Decimal number system (Base-10)
- Binary number system (Base-2)
- Octal number system (Base-8)
- Hexadecimal number system (Base-16)
Definition
A number system is a way of writing and showing numbers. It uses specific digits or symbols to represent numbers. It helps us organize and understand numbers within a certain group. Number systems also make it easier to do basic math operations like addition, subtraction, multiplication, and division.
A number is a mathematical value used for counting or measuring or labelling objects. Numbers are used to perform arithmetic calculations. Examples include: 20, 45, -10, 3.4, 11.5, -75.6, etc.
Main Idea
Every number system has a base (also called radix). The base tells us:
- How many different digit symbols the system uses.
- The value multiplier for each position (positional weight).
For example, in the decimal system the base is 10, so there are 10 digit symbols (0–9), and each position is worth 10 times the position to its right.
Core Concept
A number system is a positional-value system. This means the value of a digit depends not only on the digit itself but also on where it is placed in the number.
For example, in the decimal number 964:
- 9 represents 9 hundreds
- 6 represents 6 tens
- 4 represents 4 units
The 9 carries the most weight. It is called the Most Significant Digit (MSD). The 4 carries the least weight and is called the Least Significant Digit (LSD).
Each digit of a number carries a weight that can be expressed as a power of the base. The decimal point separates the positive powers of the base from the negative powers.
Detailed Explanation
Decimal Number System
The decimal (also called Denary) number system is composed of the 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Using these symbols we can express any quantity. The decimal number system is called base 10 system because it has 10 digits. The decimal number system is a positional-value system, in which the value of a digit depends on its position in the number.
For example, consider the decimal number 964:
- 9 represents 9 hundreds
- 6 represents 6 tens
- 4 represents 4 units
The 9 carries the most weight. It is called the Most Significant Digit (MSD). The 4 carries the least weight and is called the Least Significant Digit (LSD). Each digit of a number carries weight that can be expressed as powers of 10. This is shown below, where the number 8745.215 is represented. The decimal point separates the positive powers of 10 from the negative powers.
(8745.215)10 = 8× 103 + 7× 102 + 4× 101 + 5× 100 + 2× 10-1 + 1× 10-2 + 5× 10-3
= 8000 + 700 + 40 + 5 + 0.2 + 0.01 + 0.005
= 8745.215
In general, any number is simply the sum of the products of each digit value times its positional value.
Binary Number System
In binary number system there are only two symbols or digits, 0 and 1. The base of binary number system is 2. All the statements made earlier about the decimal number system are equally applicable to the binary number system as well. The binary system is also a positional-value system, wherein each bit has its own value or weight expressed as power of 2.
(1011.101)2 = 1× 23 + 0× 22 + 1× 21 + 1× 20 + 1× 2-1 + 0× 2-2 + 1× 2-3
= 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125
= (11.625)10
The binary number (1011.101)2 is represented above and its equivalent decimal value can be found by taking the sum of the products of each bit value (0 or 1) times its positional value. The left most bit carries the most weight and it is called the Most Significant Bit (MSB). The positions to the right of the binary point are negative powers of 2. The right most bit carries the least weight and is referred to as the Least Significant Bit (LSB).
Octal Number System
The Octal number system has a base of 8, meaning it has eight possible digits: 0, 1, 2, 3, 4, 5, 6, and 7. Thus, each digit of an octal number system can have any value from 0 to 7. The digit positions in an octal number system have weight with powers of 8. An octal number can be easily converted to its decimal equivalent by multiplying each digit by its positional weight.
For example,
(672)8 = 6× 82 + 7× 81 + 2× 80 = 384 + 56 + 2 = (442)10
Another example:
(25.6)8 = 2× 81 + 5× 80 + 6× 8-1 = 16 + 5 + 0.75 = (21.75)10
Hexadecimal Number System
The hexadecimal number system uses base 16. Thus it has 16 possible digits. It uses the digits 0–9 and letters A, B, C, D, E and F as the 16 digit symbols. The table shows the relationship among hexadecimal and decimal numbers. It is important to remember that hexadecimal digits A through F are equivalent to the decimal values 10 through 15.
| Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
A hexadecimal number can be converted to its decimal equivalent by using the fact that each digit position has a weight that is power of 16. The LSD has a weight of 160 = 1, the next higher digit has a weight of 161 = 16, the next higher digit has a weight of 162 = 256, and so on.
The conversion process is shown below.
(3AF)16 = 3× 162 + 10× 161 + 15× 160 = 768 + 160 + 15
= (943)10
Intermediate Level
The key idea is positional weight. In any base b, the value of a number is:
Value = ∑ (digit × bposition)
Positions start at 0 from the left of the decimal point (or binary/octal/hex point) and go negative to the right.
Example (Decimal):
(8745.215)10 = 8× 103 + 7× 102 + 4× 101 + 5× 100 + 2× 10-1 + 1× 10-2 + 5× 10-3
Example (Binary):
(1011.101)2 = 1× 23 + 0× 22 + 1× 21 + 1× 20 + 1× 2-1 + 0× 2-2 + 1× 2-3 = (11.625)10
Example (Octal):
(672)8 = 6× 82 + 7× 81 + 2× 80 = (442)10
Example (Hexadecimal):
(3AF)16 = 3× 162 + 10× 161 + 15× 160 = (943)10
Formula / Mathematical Form
For any base b:
(dn dn-1 … d1 d0 · d-1 d-2 …)b = ∑i di × bi
Where:
- di\) = digit at position \(i
- b = base of the number system
- i = position index (positive for left of point, negative for right)
Solved Example
Convert (25.6)8 to decimal.
Given: Octal number = (25.6)8
Required: Decimal equivalent
Formula: Value = ∑ (digit × 8position)
Substitution: (25.6)8 = 2× 81 + 5× 80 + 6× 8-1
Calculation: = 2× 8 + 5× 1 + 6× 18 = 16 + 5 + 0.75 = 21.75
Final Answer: (25.6)8 = (21.75)10
Important Points
- - A number system is defined by its base.
- - The four common systems are: Decimal (10), Binary (2), Octal (8), Hexadecimal (16).
- - Each system is a positional-value system.
- - The value of a digit depends on its position.
- - MSD/MSB = leftmost digit/bit (highest weight).
- - LSD/LSB = rightmost digit/bit (lowest weight).
- - Hexadecimal uses A–F for values 10–15.
- - Binary is the native language of computers.
Remember
- - Base 10 → 10 symbols (0–9)
- - Base 2 → 2 symbols (0, 1)
- - Base 8 → 8 symbols (0–7)
- - Base 16 → 16 symbols (0–9, A–F)
- - MSD = Most Significant Digit
- - LSD = Least Significant Digit
- - MSB = Most Significant Bit
- - LSB = Least Significant Bit
Common Mistakes
- - Forgetting that hexadecimal A–F represent 10–15.
- - Confusing MSD with LSD (MSD is on the left, LSD is on the right).
- - Forgetting to include the negative powers for digits after the point.
- - Using the wrong base when converting.
- - Thinking that the digit symbols are the same in all systems (e.g., "10" in binary is not ten).
- - Mixing up octal (base 8) and hexadecimal (base 16) symbols.
Quick Revision
- Number system = way of representing numbers using symbols and a base.
- Base = number of digit symbols.
- Decimal (10): 0–9
- Binary (2): 0,1
- Octal (8): 0–7
- Hexadecimal (16): 0–9, A–F
- Positional value: digit × base^position.
- MSD/MSB: leftmost, highest weight.
- LSD/LSB: rightmost, lowest weight.
- Conversion to decimal: multiply each digit by its positional weight and add.
60-Second Revision
- Four number systems: Decimal (10), Binary (2), Octal (8), Hexadecimal (16).
- Base = number of symbols.
- Positional value = digit × base^position.
- MSD/MSB = leftmost; LSD/LSB = rightmost.
- Hex digits: A=10, B=11, C=12, D=13, E=14, F=15.
- To convert to decimal: sum of (digit × base^position).
- Warning: Don't confuse symbols between systems; "10" in binary is 2 in decimal.
Did you understand this topic?
Your answer is saved with your learning record. It does not mark the topic as mastered.
Quick revision
Revision Zone
Review the key facts, formulas and checks before you move on.1.2.1 Types of Number Systems
Sticky Notes · Quick Revision
Key Point 1
- Base = number of symbols.
Key Point 2
- Position = power of base.
Key Point 3
- MSD = leftmost, LSD = rightmost.
Key Point 4
- Hex: A=10, B=11, C=12, D=13, E=14, F=15.
Key Point 5
- Binary: 2 symbols.
Key Point 6
- Octal: 8 symbols.
Key Point 7
- Decimal: 10 symbols.
Key Point 8
- Hex: 16 symbols.
Same supplied content as this Notes page (shared canonical source).