Number Systems in Computers: A Complete Guide for BCA Students

Introduction

Number systems are the foundation of all computing operations. Computers use different number systems to process data efficiently. In this post, we’ll cover:

✔ Definition of Number Systems
✔ Types of Number Systems (Binary, Decimal, Octal, Hexadecimal)
✔ Conversions Between Number Systems
✔ Importance in Computing
✔ Exam Tips & Practice Problems


1. What is a Number System?

number system is a way to represent numbers using symbols or digits. Each system has a base (radix), which determines how many digits it uses.

Key Terms:

  • Base (Radix): Number of unique digits in the system (e.g., base-2, base-10).

  • Bit: Single binary digit (0 or 1).

  • Nibble: 4 bits.

  • Byte: 8 bits.


2. Types of Number Systems in Computers

(A) Binary (Base-2)

  • Digits: 0, 1

  • Used in: All digital circuits, CPUs, memory.

  • Example: 1010 (Binary) = 10 (Decimal).

(B) Decimal (Base-10)

  • Digits: 0-9

  • Used in: Everyday calculations.

  • Example: 15 (Decimal) = 1111 (Binary).

(C) Octal (Base-8)

  • Digits: 0-7

  • Used in: Unix file permissions, early computing.

  • Example: 17 (Octal) = 15 (Decimal).

(D) Hexadecimal (Base-16)

  • Digits: 0-9, A-F (where A=10B=11, ..., F=15)

  • Used in: Memory addressing, programming (e.g., color codes #FF0000 = Red).

  • Example: 1F (Hex) = 31 (Decimal).


3. Why Different Number Systems?

SystemAdvantagesDisadvantages
BinarySimple for computers (ON/OFF logic).Long numbers for humans.
OctalShorter than binary, easy conversion.Less common today.
HexCompact, easy to read/write in code.Requires learning A-F.

Real-World Use:

  • Binary: Machine-level programming.

  • Hex: Debugging, web design (CSS colors).


4. Number System Conversions (Step-by-Step)

(A) Decimal to Binary

Method: Divide by 2, track remainders.
Example: Convert 25 to binary.

Decimal to binary



(B) Binary to Hexadecimal

Method: Group binary digits into 4-bit nibbles, convert each to hex.
Example: Convert 11011010 to hex.

Binary to hexadecimal



(C) Octal to Decimal

Method: Multiply each digit by 8ⁿ (n = position from right, starting at 0).
Example: Convert 47 (Octal) to decimal.

Octal to decimal



5. Quick Conversion Table

DecimalBinaryOctalHexadecimal
0000000
5010155
10101012A
15111117F

6. Exam-Focused FAQs

❓ Q1: Why is hexadecimal used in memory addressing?
✅ A: Hex shortens long binary addresses (e.g., 0x1F vs 00011111).

❓ Q2: How to convert fractional binary (e.g., 11.01) to decimal?
✅ A: Use negative powers for bits after the point:
1×2¹ + 1×2⁰ + 0×2⁻¹ + 1×2⁻² = 2 + 1 + 0 + 0.25 = 3.25

❓ Q3: What is the octal equivalent of binary 101101?
✅ A: Group into 3s101 | 101 → 5 | 5 = 55 (Octal)


7. Practice Problems

  1. Convert 45 (Decimal) to binary.

  2. Convert 110011 (Binary) to hex.

  3. Convert 2A (Hex) to decimal.

(Answers: 1011013342)


8. Summary

SystemBaseDigitsUse Case
Binary20, 1CPU operations
Decimal100-9Human calculations
Octal80-7Legacy systems
Hexadecimal160-9, A-FProgramming, memory

📢 Need a PDF of these notes? Comment "Number System Notes" below!

🔗 Related Posts:

Post a Comment

0 Comments