1. Number System
A Number System is a mathematical method of writing and representing numbers using specific digits or symbols. It defines how a value is represented visually and internally in a system.
In computers, number systems are crucial because electronic circuits are made of transistors that mainly understand only two states:
- ON (Logic 1): Represents high voltage.
- OFF (Logic 0): Represents low voltage.
Therefore, computers primarily use the Binary Number System.
2. Main Types of Number Systems
| Number System | Base (Radix) | Digits Used |
|---|---|---|
| Decimal | 10 | 0 to 9 |
| Binary | 2 | 0, 1 |
| Octal | 8 | 0 to 7 |
| Hexadecimal | 16 | 0 to 9, A to F |
3. Decimal Number System
Definition:
The Decimal number system has base 10. It is the positional numeral system we use in our daily lives for calculations.
Place Values:
Powers of 10: ...103(1000), 102(100), 101(10), 100(1)
= (3 × 10²) + (4 × 10¹) + (5 × 10⁰)
= 300 + 40 + 5 = 345
= (7 × 10²) + (0 × 10¹) + (9 × 10⁰)
= 700 + 0 + 9 = 709
4. Binary Number System
Definition:
Binary number system has base 2. It uses only two digits: 0 and 1. Each digit is called a "Bit" (Binary Digit).
Place Values:
Powers of 2: ...24(16), 23(8), 22(4), 21(2), 20(1)
= (1×2³) + (0×2²) + (1×2¹) + (1×2⁰)
= 8 + 0 + 2 + 1 = 1110
= (1×2³) + (1×2²) + (0×2¹) + (1×2⁰)
= 8 + 4 + 0 + 1 = 1310
5. Octal Number System
Definition:
Octal number system has base 8. It uses digits from 0 to 7.
= (1×8¹) + (7×8⁰)
= 8 + 7 = 1510
= (2×8¹) + (5×8⁰)
= 16 + 5 = 2110
6. Hexadecimal Number System
Definition:
Hexadecimal number system has base 16. It uses 16 symbols: 0-9 and A-F.
- A=10, B=11, C=12, D=13, E=14, F=15
= (2×16¹) + (10×16⁰)
= 32 + 10 = 4210
= (15×16¹) + (15×16⁰)
= 240 + 15 = 25510
7. Conversion of Number Systems
A. Decimal to Binary
Rule: Divide the decimal number by 2 repeatedly and record the remainders.
13 ÷ 2 = 6 rem 1 (LSB)
6 ÷ 2 = 3 rem 0
3 ÷ 2 = 1 rem 1
1 ÷ 2 = 0 rem 1 (MSB)
Result (Reading Upward): 11012
B. Binary to Decimal
= (1×2³) + (0×2²) + (1×2¹) + (0×2⁰)
= 8 + 0 + 2 + 0 = 1010
C. Decimal to Octal
Rule: Divide by 8 repeatedly.
65 ÷ 8 = 8 rem 1
8 ÷ 8 = 1 rem 0
1 ÷ 8 = 0 rem 1
Answer: 1018
D. Octal to Decimal
= (1×8²) + (5×8¹) + (7×8⁰)
= 64 + 40 + 7 = 11110
E. Decimal to Hexadecimal
Rule: Divide by 16 and replace remainders > 9 with A-F.
255 ÷ 16 = 15 rem 15 (F)
15 ÷ 16 = 0 rem 15 (F)
Answer: FF16
F. Hexadecimal to Decimal
= (3×16¹) + (15×16⁰)
= 48 + 15 = 6310
G. Binary to Octal
Rule: Group bits in 3 digits from right side.
Group: (101) (110)
Values: (5) (6)
Answer: 568
H. Octal to Binary
Rule: Convert each octal digit into 3 binary bits.
5 = 101 | 7 = 111
Answer: 1011112
I. Binary to Hexadecimal
Rule: Group bits in 4 digits from right side.
Group: (1110) (1110)
Values: (14) (14) -> (E) (E)
Answer: EE16
J. Hexadecimal to Binary
Rule: Convert each hex digit into 4 binary bits.
2 = 0010 | F = 1111
Answer: 001011112
8. Uses in Computer
- Binary: Fundamental language of computer circuits (CPU, RAM) and Machine Language.
- Decimal: Used for human-computer interaction and data entry.
- Octal: Used as a shorthand for binary, often in older minicomputer systems.
- Hexadecimal: Widely used for defining Memory Addresses, Color Codes (HTML/CSS), and Debugging.
No comments:
Post a Comment