Chapter 1: Introduction to Microprocessors
1.1 Introduction to Microprocessors
A microprocessor is a programmable electronic chip that functions as the central
processing unit (CPU) of a computer or any digital system. It is a multipurpose, clock-
driven, register-based, digital integrated circuit that accepts binary data as input,
processes it according to instructions stored in memory, and provides results as output.
Key Features:
Entire CPU on a single chip
Executes arithmetic, logic, control, and input/output operations
Commonly used in embedded systems, personal computers, and industrial
applications
Historical Context
1971: Intel 4004—the first commercial microprocessor.
Motivations: miniaturization, cost reduction, and increased computing power.
Key Functions
1. Fetch: Retrieve instructions from memory.
2. Decode: Interpret the instruction opcode.
3. Execute: Perform arithmetic/logical operations.
4. Store/Writeback: Save results to registers or memory.
Performance Metrics
Clock Speed (MHz/GHz): Number of cycles per second.
Instruction Set Architecture (ISA): Defines opcodes, registers, addressing
modes.
Data Width: Bit‑ width of internal registers and external data bus (8‑ bit, 16‑ bit,
32‑ bit, 64‑ bit).
Applications
Personal computers, embedded systems, mobile devices, industrial controllers,
automotive electronics.
Diagram: Microprocessor in a System
[Input Devices] --> [Microprocessor] --> [Output Devices]
|
[Memory Unit]
1.2 General Architecture of a Microcomputer System
A microcomputer system consists of several key components that work together to
perform tasks:
Components:
Central Processing Unit (CPU): Executes instructions
Memory Unit: Stores data and instructions (RAM, ROM)
Input/Output (I/O) Devices: Interface with the external environment
System Bus: Communication pathway for data, address, and control signals
System Buses:
Data Bus: Transfers actual data
Address Bus: Specifies memory locations
Control Bus: Manages control signals between devices
System Interconnections
Bus Contention & Arbitration: Managing multiple masters.
Memory-Mapped vs. I/O-Mapped: Address space allocation.
Timing and Synchronization
Clock Generator: Provides system timing.
Wait States: Inserted when slower memory/peripherals cannot keep up.
Diagram: Microcomputer System Architecture
+------------+ +-------------+
| Input | | Output |
| Devices | | Devices |
+------------+ +-------------+
| |
| |
v v
+--------------------------------+
| Microprocessor |
| +--------------------------+ |
| | CPU | |
| +--------------------------+ |
+--------------------------------+
| | |
| | |
v v v
[Data Bus] [Address Bus] [Control Bus]
|
v
+--------------+
| Memory |
+--------------+
1.3 Evolution of Intel Microprocessors
Intel has been a pioneer in microprocessor development. Here’s a brief overview of the
major generations:
Generatio Data
n Model Year Width Key Features
1st 4004 1971 4-bit First single-chip CPU
2nd 8008 1972 8-bit Expanded register set
3rd 8080 1974 8-bit Basis for early personal
PCs
4th 8086/8088 1978 16-bit x86 ISA introduced
5th 80186/80188 1982 16-bit Integrated peripherals
6th 80286 1982 16-bit Protected mode, memory
paging
7th 80386 1985 32-bit 32-bit registers, paging
8th 80486 1989 32-bit On-chip FPU, pipelining
9th Pentium (P5) 1993 32-bit Superscalar, MMX
10th Pentium II/III 1997/199 32-bit MMX2, SIMD
9 enhancements
Modern Core i3/i5/i7/i9, Xeon, 2006– 64-bit Multicore, virtualization,
Atom Present AVX
Milestones
Introduction of protected mode (286) enabling multitasking.
Move to 32-bit (386) and later 64-bit (AMD64 adopted by Intel).
SIMD Extensions: MMX, SSE, AVX for parallel data processing.
1.4 Architectural Compatibility
Architectural compatibility refers to the ability of new generations of processors to
execute programs designed for earlier versions.
Importance:
Ensures backward compatibility
Protects software investment
Allows gradual upgrade of hardware
Backward Compatibility
New processors support legacy instructions (e.g., x86 continues to support 8086
opcodes).
Pros: Software longevity. Cons: Complexity, larger die size.
Forward Compatibility and Emulation
Use of microcode and virtualization to run future or foreign ISAs.
Examples: Intel’s VT-x, AMD’s SVM, running ARM on x86 via QEMU.
ISA vs. Microarchitecture
ISA: Programmer-visible interface.
Microarchitecture: Implementation details (pipelines, caches, execution units).
Compatibility Layers
BIOS/UEFI: Boot-time abstraction.
Firmware and Drivers: Interface hardware to OS.
Example:
Intel’s x86 architecture maintains compatibility from 8086 up to modern Core i9
processors.
Diagram: Compatibility Layer
[Software for 8086]
|
Compatible with
v
[Modern Intel Core i7 CPU]
1.5 Hardware and Software
Hardware Components
Processor: CPU core(s), caches, clock circuit.
Memory: SRAM for caches; DRAM for main memory.
Peripherals: Timers, UART, GPIO, ADC/DAC.
Software Stack
1. Firmware/Bootloader: Initializes hardware, loads OS.
2. Operating System (OS): Manages processes, memory, devices.
3. Device Drivers: Kernel modules interfacing specific hardware.
4. Application Software: User programs, high-level languages.
Development Tools
Assembly Language: Direct control of registers and instructions.
Compilers/Linkers: Translate high‑ level code to machine code.
Debuggers/Simulators: Step through code, model hardware behavior.
Example Workflow
; Simple 8086 Assembly Snippet
MOV AX, 0x1234 ; Load constant into AX register
ADD AX, BX ; Add BX to AX
INT 0x10 ; BIOS interrupt for display)
Interaction Between Hardware and Software:
[User] --> [Application Software] --> [System Software] --> [Hardware]
1.6 Review of Basic Number Systems and Conversion
Digital systems use various number systems. The most common ones include:
1. Binary (Base-2)
Digits: 0, 1
Used in computers due to on/off state
2. Decimal (Base-10)
Digits: 0-9
Common human counting system
3. Octal (Base-8)
Digits: 0-7
Used in digital electronics as shorthand for binary
4. Hexadecimal (Base-16)
Digits: 0-9 and A-F
Compact representation of binary
Conversions:
Binary to Decimal: Multiply each bit by 2 raised to its position power and sum
them.
Decimal to Binary: Divide by 2, record remainder, reverse the order
Binary to Hexadecimal: Group bits in 4s and convert
Hexadecimal to Binary: Convert each hex digit to 4-bit binary
Examples:
Binary 1011 = Decimal 11
Decimal 25 = Binary 11001
Binary 1110 = Hex E
Hex 2F = Binary 00101111