important concepts parts of the cpu arithmetic/logic unit control unit registers program...

8
Important Concepts Parts of the CPU Arithmetic/Logic Unit Control Unit Registers Program Counter Instruction Register Fetch/Decode/Execute Cycle Machine Language Stored-Program Concept Bus Direct Memory Access

Upload: prosper-washington

Post on 05-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Important Concepts

Parts of the CPU Arithmetic/Logic Unit Control Unit Registers

Program Counter Instruction Register

Fetch/Decode/Execute Cycle Machine Language Stored-Program Concept Bus Direct Memory Access

Page 2: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Types of Instructions

Transfer Operations Load Store

Arithmetic/Logic Operations Addition, Subtraction, Multiplication, ... AND, OR, NOT, XOR Shift, Rotate

Control Operations Unconditional Jump Conditional Jump (Jump if Register > 0) Halt

Page 3: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Additional Types of Instructions

Input/Output Instructions Direct Memory Access Instructions Graphics Operations

Page 4: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Reduced Instruction Set Computer

Minimal set of instructions Complex operations are divided into simple steps Simple steps are encoded as the instructions Macro-instructions are small programs, calledmicrocode Instructions execute very quickly Faster cycle, but requires more operations Chips require less power consumption

Page 5: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Complex Instruction Set Computer

Complex instructions Require more time to execute, but do more More, specialized, operations Can include memory, graphic operations Instructions slower to execute, but do more

Page 6: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Stored Program Concept

Program can be treated as data Program can be changed in memory, read/written

to storage Allows computer to be flexible Different kinds of programs:

Machine code Assembly Language High-level Language Logic Programming

Programs can be translated from one from to another

Page 7: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Machine Instructions

Instructions are encoded as binary strings, e.g., 1011000111000

Instructions have op-codes and operands Operands are the data (or where to find the data) Op-code specifies the operation that is done to the

data Instructions may be fixed or variable length

Page 8: Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute

Fetch/Decode/Execute Cycle

The program counter keeps track of the next instruction to be executed

The next instruction is fetched and place into the instruction register

The control unit decodes the instructions – interprets the op-code, finds the operands

The instruction is executed – the control unit causes the ALU to do the proper operation based on the op-code

A Jump instruction may change the program counter