Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

Instruction Set Design
INSTRUCTION SET ARCHITECTURES
Instruction Set Architecture Classification According to the type of internal storage in a processor the basic types are Stack Accumulator General Purpose.
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Instruction Set Architecture & Design
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
What is an instruction set?
GROUP #4 CHAPTER 10 JOEL FRAGA JAIME J.OCON DEISY HERNANDEZ.
Machine Instruction Characteristics
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Homework Problems 1. M1 runs the program P in 1.4 * 9 * ns or ns M2 runs the program P in 1.6*9800*10ns or ns Hence M2 is faster by.
CS 147 June 13, 2001 Levels of Programming Languages Svetlana Velyutina.
Module 3 Instruction Set Architecture (ISA): ISA Level Elements of Instructions Instructions Types Number of Addresses Registers Types of Operands.
Module : Algorithmic state machines. Machine language Machine language is built up from discrete statements or instructions. On the processing architecture,
Important Concepts  Parts of the CPU  Arithmetic/Logic Unit  Control Unit  Registers  Program Counter  Instruction Register  Fetch/Decode/Execute.
Computer Architecture and Organization
Computer Architecture EKT 422
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
What is a program? A sequence of steps
Group # 3 Jorge Chavez Henry Diaz Janty Ghazi German Montenegro.
Ass. Prof. Dr Masri Ayob TK 2123 Lecture 14: Instruction Set Architecture Level (Level 2)
Instruction Sets. Instruction set It is a list of all instructions that a processor can execute. It is a list of all instructions that a processor can.
Instruction Sets: Characteristics and Functions  Software and Hardware interface Machine Instruction Characteristics Types of Operands Types of Operations.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
İnformasiya texnologiyaları kafedrası Mövzu № 6. Maşın əmrlərinin xarakteristikaları. ( Maşın əmrlərinin arxitekturasının ümumi təsviri. Maşın əmrlərinin.
CSC 221 Computer Organization and Assembly Language Lecture 06: Machine Instruction Characteristics.
Functions of Processor Operation Addressing modes Registers i/o module interface Memory module interface Interrupts.
Displacement (Indexed) Stack
Control Unit Lecture 6.
Computer Organization and ASSEMBLY LANGUAGE
Architecture Review Instruction Set Architecture
Microcomputer Programming
A Closer Look at Instruction Set Architectures: Expanding Opcodes
William Stallings Computer Organization and Architecture 8th Edition
BIC 10503: COMPUTER ARCHITECTURE
Asst. Prof. Dr. Gazi Erkan BOSTANCI Slides are mainly based on
Central Processing Unit
Computer Organization and ASSEMBLY LANGUAGE
CSCE Fall 2013 Prof. Jennifer L. Welch.
Chapter 8 Central Processing Unit
Processor Organization and Architecture
Asst. Prof. Dr. Gazi Erkan BOSTANCI Slides are mainly based on
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
William Stallings Computer Organization and Architecture 8th Edition
William Stallings Computer Organization and Architecture 8 th Edition Chapter 10 (Chap 12 edition 9) Instruction Sets: Characteristics and Functions.
ECEG-3202 Computer Architecture and Organization
CSCE Fall 2012 Prof. Jennifer L. Welch.
ECE 352 Digital System Fundamentals
CPU Structure CPU must:
COMPUTER ORGANIZATION AND ARCHITECTURE
Computer Architecture Assembly Language
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Computer Architecture

Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes, and the complier convert it to Machine Code to execute it. Elements of an Instruction: Operation code: Specifies the operation to be performed (Do this). Source operand reference: The operation may involve one or more source operands. Operands are inputs for the operation (To this). Result operand reference: The operation may produce a result (Put the answer here). Next instruction reference: tells CPU where to fetch the next instruction after completing task (When you have done that, do this).

Source and result operands Source and result operands can be in one of four areas: Main or virtual memory: As with next instruction references, the main or virtual memory address must be supplied. Processor register. Immediate: The value of the operand is contained in a field in the instruction being executed. I/O device: The instruction must specify the I/O module and device for the operation. Instruction Cycle State Diagram

Instruction Representation Each instruction is represented by a sequence of bits. For human consumption, a symbolic representation is used. – e.g. ADD, SUB, LOAD Opcodes are represented by abbreviations, called mnemonics, that indicate the operation. Operands can also be represented in this way. – ADD A,B

Instruction Types Data processing: Arithmetic and logic instructions. Arithmetic instructions provide computational capabilities for processing numeric data. Logic (Boolean) instructions operate on the bits of a word as bits rather than as numbers Data storage: Movement of data into or out of register and or memory locations. Data movement: I/O instructions. Control: Test and branch instructions. Test instructions are used to test the value of a data word or the status of a computation. Branch instructions are used to branch to a different set of instructions depending on the decision made.

Number of Addresses Needs very long words to hold everything Requires Temporary storage to hold some results Implicit second address, Usually a register (accumulator) Zero-address instructions are applicable to a special memory organization called a stack. Stack represent the top two elements are in processor registers. 1234

How Many Addresses (Trade Off) More addresses. – More complex (powerful) instructions. – More registers. – Fewer instructions per program. Fewer addresses. – Less complex instructions. – More instructions per program. – Faster fetch/execution of instructions.

Instruction Set Design The instruction set design means of controlling the processor Operation repertoire: How many and which operations to provide, and how complex operations should be. Data types: The various types of data upon which operations are performed. Instruction format: Instruction length (in bits), number of addresses, size of various fields, and so on. Registers: Number of processor registers that can be referenced by instructions, and their use. Addressing: The mode or modes by which the address of an operand is specified.

Types of Operand The most important general categories of data are: Addresses. Numbers. -Binary integer or binary fixed point. -Binary floating point. -Decimal. Characters. -American Standard Code for Information Interchange (ASCII). -Extended Binary Coded Decimal Interchange Code (EBCDIC). Logical data. -Each item having the value 0 or 1.

Types of Operation The number of different opcodes varies widely from machine to machine. Data Transfer. Arithmetic. Logical. Conversion. I/O. System Control. Transfer of Control.

Common Instruction Set Operations

Cont.

1. Data Transfer The most fundamental type of machine instruction is the data transfer instruction. The data transfer instruction must specify several things: First, the location of the source and destination operands must be specified. Second, the length of data to be transferred must be indicated. Third, as with all instructions with operands, the mode of addressing for each operand must be specified.

Cont.

2. Arithmetic Add, Subtract, Multiply, Divide. Other possible operations include a variety of single-operand in structions; for example: Absolute: Take the absolute value of the operand. Negate: Negate the operand (-a). Increment: Add 1 to the operand (a++). Decrement: Subtract 1 from the operand (a--).

3. Logical The NOT operation inverts a bit. AND, OR, and XOR are the most common logical functions with two operands. These logical operations can be applied bitwise to n-bit logical data units. Also, most machines provide a variety of shifting and rotating functions.

4. Conversion Conversion instructions are those that change the format or operate on the format of data. An example is converting from decimal to binary. An example of a more complex editing instruction is the Translate (TR) instruction. This instruction can be used to convert from one 8-bit code to another. 5. Input / Output Include isolated programmed I/O, memory-mapped programmed I/O, DMA, and the use of an I/O processor. Many implementations provide only a few I/O instructions, with the specific actions specified by parameters, codes, or command words.

6. System Control System control instructions are those that can be executed only while the processor is in a certain privileged state or is executing a program in a special privileged area of memory. Typically, these instructions are reserved for the use of the operating system.

Transfer of Control The most common transfer of control operations found in instruction sets: branch (jump), skip, and procedure call. ** Branch instructions: It has as one of its operands the address of the next instruction to be executed. Most often, the instruction is a conditional branch instruction. That is, the branch is made (update program counter to equal address specified in operand) only if a certain condition is met. Otherwise, the next instruction in sequence is executed (increment program counter as usual). A branch instruction in which the branch is always taken is an unconditional branch.

Example

** Skip instructions The skip instruction includes an implied address. Typically, the skip implies that one instruction be skipped; thus, the implied address equals the address of the next instruction plus one instruction length. A typical example is the increment and skip if zero (ISZ) instruction. Example

** Procedure call instruction The most important innovation in the development of programming languages is the procedure. A procedure is a self-contained computer program that is incorporated into a larger program. At any point in the program, the procedure may be invoked, or called. The processor is instructed to go and execute the entire procedure and then return to the point from which the call took place.

Example