Detailed Number System Presentation
Detailed Number System Presentation
• Example:
• Number: 345
• = 3×10² + 4×10¹ + 5×10⁰ = 300 + 40 + 5 = 345
Binary Number System (Base 2)
• • Digits: 0, 1
• • Base: 2
• • Used in computers and digital electronics
• Example:
• Binary: 1101
• = 1×2³ + 1×2² + 0×2¹ + 1×2⁰
• = 8 + 4 + 0 + 1 = 13 (Decimal)
Octal Number System (Base 8)
• • Digits: 0 to 7
• • Base: 8
• • Used in computer programming
• Example:
• Octal: 157
• = 1×8² + 5×8¹ + 7×8⁰
• = 64 + 40 + 7 = 111 (Decimal)
Hexadecimal Number System (Base
16)
• • Digits: 0-9 and A-F (A=10, B=11, ..., F=15)
• • Base: 16
• • Used in memory addressing, HTML color
codes, etc.
• Example:
• Hex: 2F
• = 2×16¹ + 15×16⁰
• = 32 + 15 = 47 (Decimal)
Conversion: Decimal to Binary
• To convert 19 to binary:
• • 19 ÷ 2 = 9, remainder = 1
• • 9 ÷ 2 = 4, remainder = 1
• • 4 ÷ 2 = 2, remainder = 0
• • 2 ÷ 2 = 1, remainder = 0
• • 1 ÷ 2 = 0, remainder = 1
• Binary = 10011
Conversion: Binary to Decimal
• Binary number: 10110
• = 1×2⁴ + 0×2³ + 1×2² + 1×2¹ + 0×2⁰
• = 16 + 0 + 4 + 2 + 0 = 22 (Decimal)
Applications of Number Systems
• • Binary: Computers, logic gates, programming
• • Decimal: General human usage
• • Octal: Unix file permissions
• • Hexadecimal: Color codes in HTML, memory
addressing