Computer Organization and Assembly Language Lecture 2 - Computer System Components & Data Representation
Agenda • Computer System Components • CPU, Memory, and I/O Devices • System Buses • Data Representation • Number Systems (Binary, Octal, Decimal, Hexadecimal) • Signed and Unsigned Numbers • ASCII and Unicode • Summary
Computer System Components • Central Processing Unit (CPU) • Memory (RAM, ROM, Cache) • Input Devices • Output Devices • Storage Devices • System Bus (Data, Address, Control)
Computer System Overview (Diagram) 📊 CPU ↔ Memory ↔ I/O Devices (Connected via System Bus)
Central Processing Unit (CPU) • Brain of the computer. • Performs arithmetic and logic operations. • Executes instructions from memory. • Key parts: ALU, Control Unit, Registers.
Memory Hierarchy (Diagram) 🔺 Top: Registers → Cache → RAM → Hard Disk → Backup Storage
Input & Output Devices Input: Keyboard, Mouse, Scanner, Microphone. Output: Monitor, Printer, Speakers. I/O devices allow interaction between user and computer. Managed by I/O controllers and device drivers.
System Bus • A communication pathway between components. • Types: - Data Bus: Transfers actual data. - Address Bus: Specifies memory locations. - Control Bus: Manages read/write operations.
Data Representation • All data is represented in binary (0s and 1s). • Used to represent numbers, text, images, and instructions. • Digital circuits understand only binary signals. • Higher-level representations (decimal, text) are mapped to binary.
Number Systems • Binary (Base 2): Digits 0,1 → Computers use this. • Octal (Base 8): Digits 0–7. • Decimal (Base 10): Digits 0–9 → Human standard. • Hexadecimal (Base 16): Digits 0–9, A–F → Compact representation.
Signed and Unsigned Numbers • Unsigned: Only positive values. Example: 8-bit → 0 to 255. • Signed: Includes positive and negative values. Example: 8-bit → -128 to +127.
Two’s Complement Representation • Method to represent negative numbers in binary. Steps: 1. Write positive binary. 2. Invert all bits (1→0, 0→1). 3. Add 1 to the result. Example: +5 (00000101) → -5 (11111011)
Character Representation • ASCII (American Standard Code for Information Interchange): - 7-bit encoding, 128 characters. - Example: 'A' = 65 (01000001). • Unicode: - Supports multiple languages. - Uses 16-bit or more.
Importance of Data Representation • Essential for programming and assembly language. • Helps understand CPU instruction operations. • Basis for arithmetic and logical operations. • Crucial in system design and debugging.
Summary • Computer system = CPU, Memory, I/O devices, Bus. • Data represented in binary, octal, decimal, hexadecimal. • Signed & unsigned numbers → Two’s complement. • Characters represented via ASCII & Unicode. • Understanding data representation is key for assembly.