Microprocessor And Computer ArchitectureUnit 112 min read
Microprocessors & Architecture: Basics, Components & Systems
Unit 1 of Microprocessor And Computer Architecture: Covers the definition of microprocessors, their evolution, internal components (ALU, CU, registers), external bus structure, system organization, and real-world applications in computing devices. Focuses on how microprocessors function as the brain of computers and em
TAKEAWAYS:
- A microprocessor is a single-chip CPU that executes instructions, performs arithmetic/logic operations, and manages data flow in digital systems.
- The von Neumann architecture (stored-program concept) is the foundation of modern microprocessors, where data and instructions share the same memory.
- Key internal components include the Arithmetic Logic Unit (ALU), Control Unit (CU), registers, and clock system, each playing a distinct role in instruction execution.
- The external bus structure (address, data, control buses) enables communication between the microprocessor and other system components like memory and I/O devices.
- Microprocessors are classified based on word size (8-bit, 16-bit, 32-bit, 64-bit), architecture (RISC/CISC), and application domain (general-purpose, embedded).
- Understanding microprocessor systems is critical for designing computers, embedded systems, and optimizing performance in real-world applications like banking transactions, mobile apps, and IoT devices.
1. What is a Microprocessor?
A microprocessor is an integrated circuit (IC) that contains all the functions of a Central Processing Unit (CPU) on a single chip. It is the "brain" of a computer or embedded system, responsible for executing instructions, performing arithmetic and logic operations, and managing data flow.
Key Characteristics of a Microprocessor:
- Single-chip design: Unlike older CPUs that required multiple chips, a microprocessor integrates all components (ALU, CU, registers, cache) into one chip.
- Programmable: Can execute different programs by loading instructions into memory.
- General-purpose or specialized: Used in computers, calculators, washing machines, and even cars.
- Clock-dependent: Operates synchronously with a clock signal to coordinate operations.
Evolution of Microprocessors
The development of microprocessors followed Moore’s Law, leading to exponential growth in performance and complexity:
- 1971: Intel 4004 (4-bit, 2,300 transistors).
- 1974: Intel 8080 (8-bit, 6,000 transistors).
- 1978: Intel 8085 (8-bit, widely used in early PCs).
- 1980s–Present: 16-bit (80286), 32-bit (Pentium), 64-bit (Core i7), and modern multi-core processors.
2. Von Neumann Architecture: The Foundation
Most modern microprocessors follow the von Neumann architecture, proposed by John von Neumann in 1945. This architecture defines how a computer processes data and instructions.
Key Features:
- Stored-Program Concept:
- Both data and instructions are stored in the same memory (RAM).
- The CPU fetches instructions sequentially unless redirected (e.g., by jumps or interrupts).
- Five Main Components:
- Input Unit: Receives data from external sources (keyboard, sensors).
- Memory Unit: Stores data and instructions (RAM, ROM).
- Arithmetic Logic Unit (ALU): Performs calculations and logical operations.
- Control Unit (CU): Manages instruction execution and data flow.
- Output Unit: Displays or transmits results (monitor, printer).
How It Works (Fetch-Decode-Execute Cycle)
stateDiagram-v2
[*] --> Fetch: Instruction from memory
Fetch --> Decode: Interpret opcode
Decode --> Execute: Perform operation (ALU/CU)
Execute --> Memory: Store result if needed
Memory --> [*]Example: When you press a key on your keyboard (e.g., typing in eSewa to pay a bill), the following happens:
- The input unit detects the keypress and sends a signal to the microprocessor.
- The CU fetches the corresponding instruction from memory (e.g., "store character in buffer").
- The ALU processes the data, and the output unit displays it on the screen.
3. Internal Organization of a Microprocessor
The microprocessor consists of three main functional units:
A. Arithmetic Logic Unit (ALU)
- Performs arithmetic operations (addition, subtraction, multiplication, division).
- Performs logical operations (AND, OR, NOT, XOR).
- Example: Calculating the total bill in Daraz when adding multiple items.
B. Control Unit (CU)
- Fetches instructions from memory.
- Decodes instructions to determine the operation.
- Coordinates data movement between ALU, registers, and memory.
- Example: Managing the login process in Khalti by verifying credentials step-by-step.
C. Registers
Small, high-speed memory locations inside the CPU used for temporary storage. Common registers in the 8085 microprocessor:
| Register | Size (bits) | Purpose |
|---|---|---|
| A | 8 | Accumulator (ALU operations) |
| B, C, D, E | 8 | General-purpose registers |
| H, L | 8 | Used for 16-bit addressing (HL) |
| SP | 16 | Stack Pointer |
| PC | 16 | Program Counter (next instruction) |
Example: In Ncell’s billing system, registers might temporarily store a customer’s phone number (B register) and balance (A register) during a transaction.
4. External Bus Structure
Microprocessors communicate with external components (memory, I/O devices) via three buses:
A. Address Bus
- Unidirectional: CPU → Memory/I/O.
- Determines the memory location or I/O device to access.
- Width = Maximum addressable memory.
- 8-bit address bus → locations.
- 16-bit address bus → KB.
B. Data Bus
- Bidirectional: CPU ↔ Memory/I/O.
- Transfers actual data (instructions, operands, results).
- Width = Data transfer capacity (e.g., 8-bit, 16-bit, 32-bit).
C. Control Bus
- Bidirectional: CPU ↔ Memory/I/O.
- Carries control signals like:
- Read (RD): CPU reads data.
- Write (WR): CPU writes data.
- Interrupt Request (INTR): Signals from I/O devices.
- Clock Signals: Synchronizes operations.
Bus Structure in 8085
Real-World Example: When you transfer money via eSewa:
- The address bus locates the recipient’s account in the bank’s database.
- The data bus transfers the transaction amount (e.g., Rs. 500).
- The control bus ensures the transaction is validated and completed.
5. Microprocessor System Organization
A complete microprocessor system includes:
- Microprocessor (CPU)
- Memory Units:
- ROM (Read-Only Memory): Stores permanent data/instructions (e.g., BIOS in PCs).
- RAM (Random Access Memory): Temporary storage for running programs (e.g., WhatsApp messages).
- I/O Devices: Keyboard, monitor, sensors, etc.
- Support Chips: Timer, DMA controller, interrupt controller.
Example: Traffic Light Control System (NTC)
How It Works:
- Sensors detect cars waiting at a junction (input via data bus).
- The microprocessor processes the data and decides the light sequence (e.g., green for 30 seconds).
- Control signals are sent to the traffic lights (output via control bus).
6. Classification of Microprocessors
Microprocessors are categorized based on:
| Basis | Types | Example |
|---|---|---|
| Word Size | 8-bit, 16-bit, 32-bit, 64-bit | 8085 (8-bit), Pentium (32-bit) |
| Architecture | RISC (Reduced Instruction Set) | ARM (used in smartphones) |
| CISC (Complex Instruction Set) | x86 (Intel/AMD) | |
| Application | General-purpose | PC processors |
| Embedded | Microwave ovens, washing machines |
Example:
- Pathao’s ride-hailing app uses a 64-bit ARM processor (RISC) for efficient mobile performance.
- ATMs (Nabil Bank) use 32-bit CISC processors for secure transaction processing.
7. Applications of Microprocessors
Microprocessors are ubiquitous in modern life:
A. Computing Devices
- PCs/Laptops: Intel Core i7 (multi-core, 64-bit).
- Servers: AMD EPYC (high-performance, multi-socket).
B. Embedded Systems
- Smartphones: Apple A15 (ARM-based, RISC).
- Washing Machines: Microprocessor controls water levels, temperature.
- Cars: Engine control units (ECUs) use microprocessors for fuel injection.
C. Communication Systems
- Routers (NTC): Manage internet traffic using microprocessors.
- Mobile Phones (Ncell): Process calls, messages, and data.
D. Industrial Automation
- Robotics: Control arms in factories.
- Medical Devices: Pacemakers use microprocessors to regulate heartbeats.
In the Real World
eSewa Payments:
- Uses microprocessor-based servers to validate transactions.
- The control unit ensures secure data transfer between user accounts and banks.
- Example: When you pay Rs. 1000 for electricity via eSewa, the microprocessor in the server calculates the deduction, updates your balance, and sends a confirmation.
Khalti Mobile App:
- The ARM processor in your smartphone executes instructions to encrypt your payment details (using ALU for cryptographic operations).
- The address bus locates your account data in the app’s memory.
Daraz Order Processing:
- When you place an order, the microprocessor in Daraz’s server manages:
- Data bus: Transfers order details (product ID, quantity, address).
- Control bus: Coordinates with inventory and shipping systems.
- ALU: Calculates total cost (including tax and discount).
- When you place an order, the microprocessor in Daraz’s server manages:
NTC Traffic Management:
- Microprocessors in traffic light controllers use sensors (input) to detect congestion and adjust timings (output).
- The program counter (PC) ensures the correct sequence of operations (e.g., green → yellow → red).
Bank ATMs (Nabil, Global IME):
- The CISC processor executes complex instructions like:
- Validating PIN (logical operations in ALU).
- Dispensing cash (control signals to the cash dispenser).
- The address bus accesses customer account records in the bank’s database.
- The CISC processor executes complex instructions like:
Exam Tip
This unit is conceptual and diagram-based. Expect questions on:
- Definitions: What is a microprocessor? Von Neumann architecture?
- Diagrams: Draw and label the 8085 internal block diagram or bus structure.
- Components: Explain the role of ALU, CU, and registers.
- Real-world applications: Relate microprocessor functions to eSewa, Khalti, or NTC systems.
- Comparisons: Differences between RISC and CISC (save for Unit 7, but basics are tested here).
Common Pitfalls:
- Forgetting that the address bus is unidirectional while the data bus is bidirectional.
- Confusing ROM (permanent storage) with RAM (temporary storage).
- Not labeling diagrams properly (e.g., missing "16-bit address bus" in the 8085 figure).
Scoring Tips:
- Use bullet points for classifications (e.g., types of buses).
- For worked examples, tie them to Nepali contexts (e.g., Daraz orders, Khalti payments).
- Memorize the 8085 pin diagram (especially DMA pins: HOLD, HLDA).
- Practice short-answer questions on von Neumann architecture and bus types.
Based on the TU BITM syllabus for Microprocessor And Computer Architecture (IT236), unit 1.
Discussion
Loading…