2. Number System
2.1 Concept of Number System: Definition of Number systems, Application of Number system conversion
2.2 Binary Calculation: Addition, Subtraction
2.3 Number Conversion
2.3.1 Decimal to Binary, Octal, Hexadecimal.
2.3.2 Binary, Octal, Hexadecimal to Decimal
2.3.3 Binary to Hexadecimal and vice versa
Understanding Number Systems and Conversions
Numbers are the foundation of computer science. Whether you’re using a calculator, writing code, or working with digital devices, you are unknowingly dealing with number systems. In this blog, we’ll explore the concept of number systems, binary calculations, conversions, and even some practical tools to make learning easier.
🔢 2.1 Concept of Number System
Definition
A Number System is a way of expressing numbers using a set of symbols or digits. Each system is based on a base (or radix), which tells us how many unique digits it uses.
Decimal (Base 10): Digits 0–9 (used in daily life).
Binary (Base 2): Digits 0 and 1 (used in computers).
Octal (Base 8): Digits 0–7.
Hexadecimal (Base 16): Digits 0–9 and A–F.
Applications of Number System Conversion
Computer Programming: Writing machine-level instructions.
Networking: IP addressing often uses binary and hexadecimal.
Digital Electronics: Microprocessors understand only binary.
Data Representation: Colors, storage size, and encryption use hexadecimal.
💻 2.2 Binary Calculations
Binary is the simplest yet most powerful system. Computers perform all calculations in binary using just 0
and 1
.
Binary Addition Rules
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10 (carry 1 to the next column)
Example:
Binary Subtraction Rules
0 – 0 = 0
1 – 0 = 1
1 – 1 = 0
0 – 1 = 1 (borrow 1 from the next column)
Example:
🔄 2.3 Number Conversions
2.3.1 Decimal to Binary, Octal, Hexadecimal
Decimal → Binary: Divide the decimal number by 2 repeatedly and record remainders.
Decimal → Octal: Divide by 8.
Decimal → Hexadecimal: Divide by 16.
Example:
Convert 25 to different systems:
Binary = 11001
Octal = 31
Hexadecimal = 19
2.3.2 Binary, Octal, Hexadecimal to Decimal
Multiply each digit by its base raised to its position power.
Example: Binary 1011 → Decimal
= (1×2³) + (0×2²) + (1×2¹) + (1×2⁰)
= 8 + 0 + 2 + 1 = 11
2.3.3 Binary to Hexadecimal and Vice Versa
Binary → Hexadecimal: Group binary digits in 4 bits.
Hexadecimal → Binary: Replace each hex digit with 4-bit binary.
Example:
Binary 11010110 → Hexadecimal
= (1101 0110) → D6
🛠️ Practical Task
To practice, you can use conversion tools available online or in mobile apps:
RapidTables (Web tool): https://www.rapidtables.com
AllMath (Web tool): https://www.allmath.com
Mobile Apps: “Binary Calculator” or “Number System Converter” (available in Google Play Store / App Store).
Try entering values and verifying your manual calculations. This will help you understand the logic behind conversions and strengthen your basics.
No comments:
Post a Comment