Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

Machine Instructions Operations
INSTRUCTION SET ARCHITECTURES
Computer Organization and Architecture
Instruction Set Architecture & Design
Memory - Registers Instruction Sets
ARM programmer’s model and assembler Embedded Systems Programming.
What is an instruction set?
Implementation of a Stored Program Computer
Chapter 10 Instruction Sets: Characteristics and Functions.
Lecture 18 Last Lecture Today’s Topic Instruction formats
GROUP #4 CHAPTER 10 JOEL FRAGA JAIME J.OCON DEISY HERNANDEZ.
Instruction Set Architecture
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.
Implementation of a Stored Program Computer ITCS 3181 Logic and Computer Systems 2014 B. Wilkinson Slides2.ppt Modification date: Oct 16,
Chapter 2-2 Assembly Instructions Number Systems Number Systems Assembly Instructions Assembly Instructions Branch Branch Next Lecture Next Lecture  Addressing.
Module 3 Instruction Set Architecture (ISA): ISA Level Elements of Instructions Instructions Types Number of Addresses Registers Types of Operands.
Instruction Set Architecture The portion of the machine visible to the programmer Issues: Internal storage model Addressing modes Operations Operands Encoding.
Instruction Sets: Characteristics Functions Addressing Modes Formats Chapter7:
Computer Architecture and Organization
Computer Architecture EKT 422
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Computer Organization 1 Instruction Fetch and Execute.
Dr Mohamed Menacer College of Computer Science and Engineering, Taibah University CE-321: Computer.
Lecture 5 A Closer Look at Instruction Set Architectures Lecture Duration: 2 Hours.
What is a program? A sequence of steps
PART 4: (1/2) Central Processing Unit (CPU) Basics CHAPTER 12: P ROCESSOR S TRUCTURE AND F UNCTION.
Group # 3 Jorge Chavez Henry Diaz Janty Ghazi German Montenegro.
EKT 422/4 COMPUTER ARCHITECTURE SoME-0809-I 1 Chapter 3a Instruction Sets: Characteristics and Functions.
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.
CSC 221 Computer Organization and Assembly Language Lecture 06: Machine Instruction Characteristics.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Computer Organization and ASSEMBLY LANGUAGE
Architecture Review Instruction Set Architecture
A Closer Look at Instruction Set Architectures
A Closer Look at Instruction Set Architectures: Expanding Opcodes
Computer Organization and Assembly Language (COAL)
BIC 10503: COMPUTER ARCHITECTURE
Central Processing Unit
Computer Organization and ASSEMBLY LANGUAGE
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
Computer Architecture
Chapter 9 Instruction Sets: Characteristics and Functions
William Stallings Computer Organization and Architecture 8 th Edition Chapter 10 (Chap 12 edition 9) Instruction Sets: Characteristics and Functions.
Computer Instructions
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
CPU Structure CPU must:
COMPUTER ORGANIZATION AND ARCHITECTURE
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown

 The complete collection of instructions that are understood by a CPU  Machine Code  Binary  Usually represented by assembly codes

 Operation code (Op code)  Do this  Source Operand reference  To this  Result Operand reference  Put the answer here  Next Instruction Reference  When you have done that, do this...

 In machine code each instruction has a unique bit pattern  For human consumption (well, programmers anyway) a symbolic representation is used  e.g. ADD, SUB, LOAD  Operands can also be represented in this way  ADD A,B

 Data processing  Data storage (main memory)  Data movement (I/O)  Program flow control

 3 addresses  Operand 1, Operand 2, Result  a = b + c;  May be a forth - next instruction (usually implicit)  Not common  Needs very long words to hold everything

 2 addresses  One address doubles as operand and result  a = a + b  Reduces length of instruction  Requires some extra work  Temporary storage to hold some results

 1 address  Implicit second address  Usually a register (accumulator)  Common on early machines

 0 (zero) addresses  All addresses implicit  Uses a stack  e.g. push a  push b  add  pop c  c = a + b

 More addresses  More complex (powerful?) instructions  More registers  Inter-register operations are quicker  Fewer instructions per program  Fewer addresses  Less complex (powerful?) instructions  More instructions per program  Faster fetch/execution of instructions

 Operation repertoire  How many ops?  What can they do?  How complex are they?  Data types (Characteristics later…)  Different forms of data to which operations are performed  Instruction formats  Length of op code field  Number of addresses  Size of various fields

 Registers  Number of CPU registers available  Which operations can be performed on which registers?  Addressing modes (later…)  RISC vs. CISC

 Addresses  Numbers  Integer/floating point  Characters  ASCII etc.  Logical Data

 Data Transfer  Arithmetic  Logical  Conversion  I/O  System Control  Transfer of Control

 Specify  Source  Destination  Amount of data  Addressing mode (later…)  May be different instructions for different movements  e.g. IBM 390  Or one instruction and different addresses  e.g. VAX

 Add, Subtract, Multiply, Divide  Signed Integer (Always provided for)  Floating point (Often provided for)  Packed decimals (Often provided for)  May include  Increment (a++)  Decrement (a--)  Absolute Value (|a|)  Negate (-a)  May involve data transfer operations

 Bitwise operations  AND, OR, XOR, NOT, Equals Conversion Ex: Binary to Decimal. Decimal to Binary

 Falls into the following categories:  Control and timing  Processor communication  Device communication  Data buffering  Error detection  May be specific instruction  May be done using data movement instructions (memory mapped)  May be done by a separate controller (DMA)

 Executed only in a privileged state  CPU needs to be in specific state  Ring 0 on  Kernel mode  For operating systems use

 Branch  e.g. branch to x if result is zero  Skip  e.g. increment and skip if zero  ISZ Register1  Branch xxxx  ADD A

 What order do we read numbers that occupy more than one byte  e.g. (numbers in hex to make it easy to read)  can be stored in 4x8bit locations as follows

Provide four instructions to support procedure call/return  CALL  ENTER  LEAVE  RETURN A new Procedure call/return Push the return point on the stack Push the current frame pointer on the stack Copy the stack pointer as the new value of the frame pointer Adjust the stack pointer to allocate frame

 AddressValue (1)Value(2)      i.e. read top down or bottom up?

 The problem is called Endian  The system on the left has the least significant byte in the lowest address  This is called big-endian  The system on the right has the least significant byte in the highest address  This is called little-endian

1What are the typical elements of a machine instruction? 2What types of locations can hold source and destination operands? 3If an instruction contains four addresses, what might be the purpose of each address? 4What types of operands are typical in machine instruction set? 5What is the difference between an arithmetic shift and a logic shift? 6What is the difference between assembly language and machine language 7What is the difference between big endian and little endian? 8 List three places for storing the return address for a procedure return.

1Operation code, source operand reference, result operand reference and next instruction reference. 2 Register and memory. 3 Two operands, one result, and the address of the next instruction. 4 Address, character, numbers and logical data. 5 In logical shift, the bits of word are shifted left or right. Arithmetic shift treats the data as a signed integer and does not shift the sign bit.

6Assemble language uses symbolic names for addresses that are not fixed to specific physical address; this is not the case with machine language. 7 A multibyte numerical value stored with the most significant byte in the lowest numerical address. A multibyte numerical value stored with the most significant byte in the highest numerical address. 8 Register, start of procedure, top of stack