Unit 1: Introduction to Microprocessors
Definition of a Microprocessor:
A microprocessor is a programmable electronic device that executes instructions stored in
memory.
It acts as the "brain" of a computer system, managing the flow of data and controlling
peripheral devices.
Evolution of Microprocessors:
Microprocessors have evolved from simple 4-bit processors to advanced multi-core
processors found in modern systems.
Key milestones in microprocessor development include:
o Intel 4004: The first commercially available microprocessor (4-bit).
o Intel 8080: A widely used 8-bit microprocessor in early personal computers.
o Intel 8086: Introduced 16-bit architecture and became the foundation for future
Intel processors.
o Pentium series: Introduced advanced features like superscalar architecture and
improved instruction sets.
Architecture of a Microprocessor:
Control Unit (CU): Responsible for coordinating the execution of instructions and
directing the operations of the CPU.
Arithmetic Logic Unit (ALU): Performs arithmetic operations (addition, subtraction,
etc.) and logical operations (AND, OR, etc.).
Registers: Small, fast storage locations used for temporary data storage during
instruction execution.
Memory: Stores the instructions and data needed for processing. This includes RAM,
ROM, and cache memory.
Basic Microprocessor Instructions:
Data Transfer Instructions: Involve moving data between registers, memory, and I/O
devices (e.g., MOV, ADD, SUB).
Arithmetic Instructions: Used for performing arithmetic operations (e.g., ADD, SUB,
MUL, DIV).
Logical Instructions: Perform logical operations like AND, OR, and NOT on data.
Control Flow Instructions: Control the flow of execution in a program (e.g., JMP, JNZ,
CALL, RET).
Assembly Language Programming:
Assembly language is a low-level programming language that is closely tied to machine
code.
It allows programmers to directly manipulate hardware resources and perform tasks
requiring high precision, such as system programming and embedded systems
development.
Assembly language is specific to the microprocessor's architecture and requires
understanding of instruction sets.
These notes cover key aspects of microprocessors, offering foundational knowledge for
understanding how these devices function within a computer system.
Unit 1: Introduction to Microprocessors
Definition of a Microprocessor:
A microprocessor is an integrated circuit that contains the functions of a central
processing unit (CPU) on a single chip. It is designed to execute a sequence of stored
instructions, which are programmed into its memory.
It's often referred to as the "brain" of a computer because it handles all the computations
and decision-making processes.
Microprocessors take input data, process it according to instructions, and output the
results. This is done through its three main functions: fetching, decoding, and executing
instructions.
Found in everyday devices like computers, smartphones, washing machines, and even
automobiles, microprocessors are essential in controlling the operations of these devices.
The microprocessor executes a series of instructions in machine code—binary or
hexadecimal—although higher-level programming languages (e.g., C, C++) are compiled
into this machine code.
Evolution of Microprocessors:
The evolution of microprocessors is marked by significant technological advancements
over the decades, leading to smaller, faster, and more powerful processors.
Intel 4004 (1971):
o The first commercially available microprocessor, it was a 4-bit processor and
could process just 4 bits of data at a time. It was primarily used in calculators.
o Although simple by today’s standards, it was groundbreaking in its ability to carry
out instructions and control devices.
Intel 8080 (1974):
o The 8080 was an 8-bit processor and became popular for use in early personal
computers.
o This processor could handle more complex tasks, like basic graphics and word
processing, and is considered one of the first true general-purpose processors.
Intel 8086 (1978):
o This was the first processor in the x86 family, a 16-bit microprocessor that laid
the foundation for the architecture used in modern-day Intel processors.
o It was widely used in personal computers and was compatible with more
advanced software, enabling multitasking.
Pentium series (1993-present):
o Intel's Pentium processors introduced superscalar architecture, allowing the
processor to execute multiple instructions per clock cycle.
o This series also saw increased clock speeds and wider data buses, which made it
more powerful and faster.
o The Pentium processors made it possible for more complex operating systems,
like Windows, to run efficiently.
Modern multi-core processors (2000s-present):
o Today’s microprocessors are multi-core, meaning they have more than one
processing unit on a single chip, allowing for parallel processing.
o This significantly boosts performance, particularly in multitasking environments
where multiple programs are running simultaneously.
Architecture of a Microprocessor:
A microprocessor is composed of several key components that work together to execute
instructions:
1. Control Unit (CU):
o The control unit is the "manager" of the microprocessor. It interprets instructions
from the program and sends signals to other parts of the system (like the ALU,
memory, or input/output devices) to perform operations.
o The CU coordinates the sequence of data transfer, making sure that each
component knows what to do and when to do it.
2. Arithmetic Logic Unit (ALU):
o The ALU is responsible for performing all arithmetic operations (e.g., addition,
subtraction, multiplication, division) and logical operations (e.g., AND, OR,
NOT).
o It acts like a calculator inside the microprocessor, handling both basic
mathematical calculations and decision-making tasks, such as comparing two
values.
3. Registers:
o Registers are small storage locations within the CPU that temporarily hold data
and instructions.
o There are different types of registers, like accumulators (which store
intermediate results), instruction registers (which hold the instruction being
executed), and program counters (which track the next instruction to be
executed).
4. Memory:
o Memory stores the data and instructions the microprocessor needs to access while
running programs. This can be RAM (Random Access Memory) for temporary
storage, or ROM (Read-Only Memory) for permanent instructions, such as the
boot sequence of a computer.
o Modern microprocessors also have cache memory, which is a small, fast memory
that stores frequently used data and instructions to speed up processing.
Basic Microprocessor Instructions:
Microprocessors execute instructions that tell them how to process data. These instructions are
divided into several categories:
1. Data Transfer Instructions:
o These involve moving data between registers, memory, or input/output devices.
Examples include:
MOV: Move data from one location to another.
ADD: Add data from one location to another.
SUB: Subtract one value from another.
2. Arithmetic Instructions:
o These instructions allow the microprocessor to perform arithmetic operations:
ADD: Add two values.
SUB: Subtract one value from another.
MUL: Multiply two values.
DIV: Divide one value by another.
3. Logical Instructions:
o Logical operations are used for decision-making in programs:
AND: Perform a logical AND between two values.
OR: Perform a logical OR between two values.
NOT: Invert the bits of a value (change 1 to 0 and 0 to 1).
4. Control Flow Instructions:
o These instructions change the sequence of execution in a program:
JMP: Jump to a different instruction in the program.
JNZ: Jump if the result of the last operation is not zero.
CALL: Call a subroutine (a set of instructions).
RET: Return from a subroutine to continue execution.
Assembly Language Programming:
Assembly language is a low-level programming language that is one step above machine
code. It uses mnemonic codes or symbols to represent instructions in a form that is easier
for humans to read and write but is still closely related to machine code.
In assembly language, each instruction is typically represented by a short keyword (like
MOV, ADD, or JMP), making it easier to remember than writing out the binary or
hexadecimal equivalent.
Assembly language is used when you need precise control over the hardware, such as in
embedded systems or for performance-critical applications.
It is processor-specific, meaning assembly code written for one type of microprocessor
(e.g., Intel) may not work on another type (e.g., ARM) without modification.
While assembly is rarely used for general-purpose programming today, it is still
important in fields like operating systems development, device drivers, and low-level
hardware control.