INEL 4215
Computer Architecture and Organization
Lecture
Computer Instruction Sets
Data Movement Instructions
Data resides in
CPU
Main memory
Input Device
Output Device
Data Movements Examples
Memory to memory
Memory to CPU
Constant to CPU
CPU to output
Input to CPU
See Table 2.1
ALU instructions
Arithmetic Operations
Addition
Subtraction
Multiplication
Division
Logical Operations
AND
OR
NOT
See Table 2.2
Branch Instructions
Program Counter (PC) points to next instruction. PC controls program flow. A transfer control or branch instruction requires the computation of a target address and to load this address to the PC.
Branch
Unconditional
Example: goto
Conditional
Depends on some condition in the processor state (true or false)
Processor state is stored in
PSW – Processor Status Word
CC – Condition Code Register same
Status Register
Most common condition-code bits
Zero (z) – zero result
Overflow (o) – arithmetic overflow (when calculation produces a result greater than a given register or storage location)
Carry (c) – carry-out the most significant bit
Negative (n) – negative result.
See Table 2.3
Addressing Modes
Addressing Modes: ways of providing access paths to operands in memory and CPU registers.
See figure 2.8