Recent Post

Saturday, 18 April 2026

Exploring Number System

Computer Number System Complete Notes | Decimal Binary Octal Hexadecimal

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)

Example 1: 34510
= (3 × 10²) + (4 × 10¹) + (5 × 10⁰)
= 300 + 40 + 5 = 345
Example 2: 70910
= (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)

Example 1: 10112
= (1×2³) + (0×2²) + (1×2¹) + (1×2⁰)
= 8 + 0 + 2 + 1 = 1110
Example 2: 11012
= (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.

Example 1: 178
= (1×8¹) + (7×8⁰)
= 8 + 7 = 1510
Example 2: 258
= (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
Example 1: 2A16
= (2×16¹) + (10×16⁰)
= 32 + 10 = 4210
Example 2: FF16
= (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.

1310 to Binary:
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

10102:
= (1×2³) + (0×2²) + (1×2¹) + (0×2⁰)
= 8 + 0 + 2 + 0 = 1010

C. Decimal to Octal

Rule: Divide by 8 repeatedly.

6510 to Octal:
65 ÷ 8 = 8 rem 1
8 ÷ 8 = 1 rem 0
1 ÷ 8 = 0 rem 1
Answer: 1018

D. Octal to Decimal

1578:
= (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.

25510 to Hex:
255 ÷ 16 = 15 rem 15 (F)
15 ÷ 16 = 0 rem 15 (F)
Answer: FF16

F. Hexadecimal to Decimal

3F16:
= (3×16¹) + (15×16⁰)
= 48 + 15 = 6310

G. Binary to Octal

Rule: Group bits in 3 digits from right side.

1011102:
Group: (101) (110)
Values: (5) (6)
Answer: 568

H. Octal to Binary

Rule: Convert each octal digit into 3 binary bits.

578:
5 = 101 | 7 = 111
Answer: 1011112

I. Binary to Hexadecimal

Rule: Group bits in 4 digits from right side.

111011102:
Group: (1110) (1110)
Values: (14) (14) -> (E) (E)
Answer: EE16

J. Hexadecimal to Binary

Rule: Convert each hex digit into 4 binary bits.

2F16:
2 = 0010 | F = 1111
Answer: 001011112

8. Uses in Computer

  1. Binary: Fundamental language of computer circuits (CPU, RAM) and Machine Language.
  2. Decimal: Used for human-computer interaction and data entry.
  3. Octal: Used as a shorthand for binary, often in older minicomputer systems.
  4. Hexadecimal: Widely used for defining Memory Addresses, Color Codes (HTML/CSS), and Debugging.

No comments:

"कोशिश करो तो सब कुछ हो सकता है, न करो तो कुछ नहीं हो सकता।"