Introduction to Microprocessors: Architecture, Instruction Set, and Assembly Language, Lecture notes of Introduction to Computers

This lecture provides a comprehensive introduction to microprocessors, covering their fundamental characteristics, architecture, and programming concepts. It delves into the key components of a microprocessor, including registers, memory addressing modes, and the arithmetic logic unit (alu). The lecture also explores the instruction set, instruction execution cycle, and assembly language programming, providing a foundational understanding of how microprocessors function and interact with software.

Typology: Lecture notes

2023/2024

Uploaded on 02/14/2025

mohammed-alnaham
mohammed-alnaham 🇴🇲

1 document

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture1
Introduction to Microprocessors
By
Dr. Mohammed Y.M Alnaham
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download Introduction to Microprocessors: Architecture, Instruction Set, and Assembly Language and more Lecture notes Introduction to Computers in PDF only on Docsity!

Lecture

Introduction to Microprocessors

By

Dr. Mohammed Y.M Alnaham

A microprocessor

  • (^) A microprocessor is a central processing unit

(CPU) implemented on a single integrated

circuit (IC) chip.

  • (^) It is the essential component of a computer

that performs arithmetic and logical

operations, controls the computer's operation,

and manages the flow of information to and

from other components of the computer

system.

  • (^) 4. Performance: Microprocessor performance is

measured in terms of clock speed (frequency),

number of cores, and other architectural features

that enable faster processing of instructions.

  • (^) 5. Power efficiency: Advances in microprocessor

design and manufacturing have led to

increasingly power-efficient microprocessors,

making them suitable for use in portable and

battery-powered devices.

  • (^) Microprocessors are the backbone of

modern computing and are found in

a wide range of devices, including

personal computers, smartphones,

tablets, servers, gaming consoles,

and a vast array of embedded

systems like industrial machinery,

household appliances, and

automotive electronics.

Primary registers of a microprocessor in Von

Neumann architecture

  • (^) 1. Program Counter (PC): The program counter

stores the memory address of the next

instruction to be fetched and executed. It is used

to keep track of the current position in the

program.

  • (^) 2. Accumulator (ACC): The accumulator is a

central register that holds the results of

arithmetic and logic operations. It is used to store

intermediate results during computational tasks.

  • (^) 3. Memory Address Register (MAR): The memory

address register holds the memory address from

which data is to be read or to which data is to be

written.

  • (^) 4. Memory Data Register (MDR): The memory data

register holds the data that is to be written to or

read from memory.

Instruction Set

The instruction set of a microprocessor refers to the

collection of machine-level instructions that the

processor can execute.

  • (^) 1. Instruction Format:

  • Opcode: Specifies the operation to be performed

(e.g., add, subtract, load, store)

  • Operands: Specifies the data or addresses involved in

the operation

  • Addressing Modes: Specify how the operands are

accessed (e.g., immediate, direct, indirect)

Instruction Set

  • (^) 2. Instruction Types:

  • Data Transfer Instructions: Load, store, move data

between registers, memory, and I/O

  • Arithmetic and Logical Instructions: Add, subtract,

multiply, divide, logical operations (AND, OR, XOR, NOT)

  • Control Transfer Instructions: Conditional and

unconditional jumps, calls, returns

  • Comparison Instructions: Compare values and set

flags - Interrupt Instructions: Enable, disable, and

handle interrupts

Instruction Set

  • (^) 4. Addressing Modes:

  • Immediate: The operand is a constant value

specified in the instruction

  • Direct: The operand is located at a specific

memory address

  • Indirect: The operand's address is stored in a

register

  • Indexed: The operand's address is calculated by

adding an index value to a base address

Instruction Set

  • (^) 5. Microarchitecture:

  • Pipelining: Allows multiple instructions to be

executed concurrently, improving performance

  • Superscalar: Allows multiple instructions to be

executed in parallel, further improving

performance

  • RISC vs. CISC: Reduced Instruction Set

Computer (RISC) vs. Complex Instruction Set

Computer (CISC) architectures

Memory addressing modes

  • (^) 3. Indirect Addressing:
  • The operand's memory address is stored in

a register. - Example: MOV AX, [BX]

  • (^) 4. Indexed Addressing:
  • The operand's memory address is calculated

by adding an index value (in a register) to a

base address. - Example: MOV AX, [BX + SI]

Memory addressing modes

  • (^) 5. Base-Indexed with Displacement Addressing:

  • The operand's memory address is calculated by

adding a base register, an index register, and a

constant displacement value. - Example: MOV AX, [BX

  • SI + 0x10]
  • (^) 6. Relative Addressing:

  • The operand's memory address is calculated by

adding a signed offset to the current instruction's

address (program counter). - Example: JMP [PC +

0x100].

ALU

The main functions of an ALU include:

  • (^) 1. Arithmetic Operations:
  • Addition
  • Subtraction
  • Multiplication
  • Division

ALU

  • (^) 2. Logical Operations:

- AND

- OR

- NOT

- XOR

  • Shift operations (left/right shift)