Number system
- Get link
- X
- Other Apps
๐ Number Systems Study Guide
๐ข 1. What is a Number System?
A number system defines a way to represent numbers using a specific base (or radix). It includes a set of symbols (digits) and rules for representing and manipulating numbers.
๐ 2. Common Number Systems
| Name | Base | Digits Used | Example |
|---|---|---|---|
| Binary | 2 | 0, 1 | 1010₂ = 10₁₀ |
| Octal | 8 | 0–7 | 17₈ = 15₁₀ |
| Decimal | 10 | 0–9 | 123₁₀ |
| Hexadecimal | 16 | 0–9, A–F (A=10...F=15) | 1A₁₆ = 26₁₀ |
๐ 3. Conversion Between Number Systems
✅ Decimal to Binary
Method: Divide by 2, record remainder, repeat with quotient until 0.
Example:
13₁₀ → 1101₂
✅ Binary to Decimal
Method: Multiply each bit by 2โฟ (right to left) and sum.
Example:
1101₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 13₁₀
✅ Decimal to Hexadecimal
Method: Divide by 16 and record remainders.
Example:
47₁₀ → 2F₁₆
✅ Hexadecimal to Binary
Method: Convert each hex digit to 4-bit binary.
Example:
2F₁₆ = 0010 1111₂
๐ง 4. 1’s and 2’s Complement (Binary Only)
✅ 1’s Complement
Invert each bit (0→1, 1→0).
1010 → 0101
✅ 2’s Complement
Add 1 to the 1’s complement.
0101 + 1 = 0110
Used to represent negative binary numbers.
๐ก 5. Binary Arithmetic
| Operation | Rule |
|---|---|
| Addition | 0+0=0, 1+0=1, 1+1=10 (carry), 1+1+1=11 |
| Subtraction | Use 2’s complement of the subtrahend |
| Multiplication | Similar to decimal, use shifting |
| Division | Repeated subtraction or long division method |
๐งพ 6. BCD (Binary-Coded Decimal)
Each decimal digit is represented separately in 4-bit binary.
| Decimal | BCD |
|---|---|
| 5 | 0101 |
| 9 | 1001 |
| 12 | 0001 0010 |
๐ 7. Applications in Computer Science
-
Memory Addressing (Binary)
-
Machine-level instructions
-
Data Representation
-
Digital Circuit Design
-
Error Detection (e.g., parity bits)
- Get link
- X
- Other Apps
Comments
Post a Comment