COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.

Slides:



Advertisements
Similar presentations
CH10 Instruction Sets: Characteristics and Functions
Advertisements

Instruction Set Design
Goal: Write Programs in Assembly
Computer Organization and Architecture
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
Operand And Instructions Representation By Dave Maung.
Instruction Set Architecture & Design
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
What is an instruction set?
Group 5 Alain J. Percial Paula A. Ortiz Francis X. Ruiz.
Chapter 5: ISAs In MARIE, we had simple instructions –4 bit op code followed by either 12 bit address for load, store, add, subt, jump 2 bit condition.
Operand Addressing and Instruction Representation
GROUP #4 CHAPTER 10 JOEL FRAGA JAIME J.OCON DEISY HERNANDEZ.
Lecture 3. Diff b/w RAM and Registers Registers are used to hold data immediately applicable to the operation at hand Registers are used to hold data.
Machine Instruction Characteristics
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1.
Instruction Set Architecture
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
CS 147 June 13, 2001 Levels of Programming Languages Svetlana Velyutina.
CSC 3210 Computer Organization and Programming Chapter 1 THE COMPUTER D.M. Rasanjalee Himali.
Chapter 2-2 Assembly Instructions Number Systems Number Systems Assembly Instructions Assembly Instructions Branch Branch Next Lecture Next Lecture  Addressing.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Computer Architecture and Organization
Indira Gandhi National Open University presents. A Video Lecture Course: Computer Platforms.
Computer Architecture EKT 422
Operand Addressing And Instruction Representation Cs355-Chapter 6.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
COMPUTER ORGANIZATION AND ASSEMBLY LANGUAGE Lecture 21 & 22 Processor Organization Register Organization Course Instructor: Engr. Aisha Danish.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
What is a program? A sequence of steps
Group # 3 Jorge Chavez Henry Diaz Janty Ghazi German Montenegro.
CMSC 104, Lecture 061 Stored Programs A look at how programs are executed.
Ass. Prof. Dr Masri Ayob TK 2123 Lecture 14: Instruction Set Architecture Level (Level 2)
Computer Organization Instructions Language of The Computer (MIPS) 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.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
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.
P.D.Thakar Prof.Ram Meghe College of Engineering & Management.
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,
Instruction sets : Addressing modes and Formats
Control Unit Lecture 6.
Architecture Review Instruction Set Architecture
Microcomputer Programming
Processor Organization and Architecture
The Processor and Machine Language
BIC 10503: COMPUTER ARCHITECTURE
Central Processing Unit
Computer Organization and ASSEMBLY LANGUAGE
Processor Organization and Architecture
ECEG-3202 Computer Architecture and Organization
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
ECEG-3202 Computer Architecture and Organization
COMPUTER ORGANIZATION AND ARCHITECTURE
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1

COMPUTER ORGANIZATIONS CSNB123 Architecture Attributes visible to the programmer  Instruction set  Number of bits used for data representation  I/O mechanisms  Addressing techniques Recap Chapter 1 Ver.1Systems and Networking2

COMPUTER ORGANIZATIONS CSNB123 Machine Instruction Characteristics TermDescription Machine instruction / computer instructions Instruction which is executed by processor Processor’s instruction set Collection of different instructions that the processor can execute Each instruction must contain the information required by the processor for execution NSMS2013 Ver.1Systems and Networking3

COMPUTER ORGANIZATIONS CSNB123 Machine Instruction Characteristics (Cont.) Elements of Machine Instruction (MI) ElementsDescription Operation code (opcode) specifies the operation to be performed ADD, SUB Source operand reference operands that are inputs for the operation Result operand reference the operation may produce a result Next instruction reference tell processor where to fetch the next instruction after the execution of this instruction is complete NSMS2013 Ver.1Systems and Networking4

COMPUTER ORGANIZATIONS CSNB123 Simple Instruction Format Instruction is represented by a sequence of bits During instruction execution, an instruction is read into an instruction register (IR) in the processor. The processor must be able to extract the data from the various instruction fields to perform the required operation Opcodes are presented by abbreviations-mnemonics-that indicate the operation..why do this …hard to remember code in binary form NSMS2013 Ver.1Systems and Networking5

COMPUTER ORGANIZATIONS CSNB123 Simple Instruction Format (Cont.) Operands also represented symbolically Example:  Add the value contained in the location Y to the contents of register R  Y=refer to the address of a location in memory  R=refers to a particular register NSMS2013 Ver.1Systems and Networking6

COMPUTER ORGANIZATIONS CSNB123 Instruction Types HLL language instruction in BASIC Instruct the computer to add the value stored in Y to the value stored in X and put the result in X. NSMS2013 Ver.1Systems and Networking7

COMPUTER ORGANIZATIONS CSNB123 Instruction Types (Cont.) Simple instruction sets Load a register with the contents of memory location 513 Add the contents of memory location 514 to the register Store the contents of the register in memory location 513 NSMS2013 Ver.1Systems and Networking8

COMPUTER ORGANIZATIONS CSNB123 Instruction Types (Cont.) CategoryDescription Data processingArithmetic and logic instructions Data storageMovement of data into or out of register and or memory locations Data movementI/O instructions Control-test and branch instructions Test instructions are used to test the value of a data word or the status of the operation Branch instructions are used to branch to a different set of instructions depending on the decision made NSMS2013 Ver.1Systems and Networking9

COMPUTER ORGANIZATIONS CSNB123 Number of Address Address refer to location that store the value of the operands In most architecture, most instructions have 1,2 or 3 operand addresses NSMS2013 Ver.1Systems and Networking10

COMPUTER ORGANIZATIONS CSNB123 Example NSMS2013 Ver.1Systems and Networking11

COMPUTER ORGANIZATIONS CSNB123 3 address instructions Each instruction specifies two source operand locations and a destination operation location Operand 1, Operand 2, Result Not common since they require a relatively long instructions format to hold the three address references T = temporary location-to store intermediary result NSMS2013 Ver.1Systems and Networking12

COMPUTER ORGANIZATIONS CSNB123 Example NSMS2013 Ver.1Systems and Networking13 InstructionComment SUB Y, A, BY  A-B MPY T, D, ET  D * E ADD T, T, CT  T + C DIV Y, Y, TY  Y / T

COMPUTER ORGANIZATIONS CSNB123 2 address instructions Each instruction specifies both an operand and the result location Operand 1, Operand 2, Result MOVE – is used to move one of the values to a result/temp loc before performing the operation Reduce space for address NSMS2013 Ver.1Systems and Networking14

COMPUTER ORGANIZATIONS CSNB123 Example NSMS2013 Ver.1Systems and Networking15 InstructionComment MOVE Y, AY  A SUB Y, BY  Y – B MOVE T, DT  D MPY T, ET  T * E ADD T, CT  T + C DIV Y, TY  Y / T

COMPUTER ORGANIZATIONS CSNB123 1 address instructions Second address must be implicit (hidden) Common in earlier machines- the implied address being a processor register known as the accumulator (AC) The AC contains one of the operands and is used to store the result NSMS2013 Ver.1Systems and Networking16

COMPUTER ORGANIZATIONS CSNB123 Example NSMS2013 Ver.1Systems and Networking17 InstructionComment LOAD DAC  D MPY EAC  AC * E ADD CAC  AC + C STOR YY  AC LOAD AAC  A SUB BAC  AC – B DIV YAC  AC / Y STOR YY  AC

COMPUTER ORGANIZATIONS CSNB123 0 address instructions All address must be implicit (hidden) Stack-based operations  last-in-first-out (LIFO) set of locations  Interact with the stack using PUSH and POP operations PUSH – to push a data from memory onto the stack POP – to pop out data from the stack to a memory location NSMS2013 Ver.1Systems and Networking18

COMPUTER ORGANIZATIONS CSNB123 Example NSMS2013 Ver.1Systems and Networking19 Instruction PUSH A PUSH B SUB PUSH C PUSH E PUSH D MPY ADD DIV POP A PUSH B PUSH A A B A SUB A PUSH C C A PUSH D C D A PUSH E C D E A C MPY D A C ADD A DIV POP

COMPUTER ORGANIZATIONS CSNB123 Number of Address (Cont.) Fewer address  require less complex processor  Instruction become shorter  But contain more total instructions-longer execution time NSMS2013 Ver.1Systems and Networking20

COMPUTER ORGANIZATIONS CSNB123 Number of Address (Cont.) Multiple address instructions – have multiple general purpose register Register references are faster than memory references – speed up the execution Most contemporary machine employ a mixture of 2 and 3 address instructions NSMS2013 Ver.1Systems and Networking21

COMPUTER ORGANIZATIONS CSNB123 Types of Operands Categories of data  Addresses  Numbers Integer/floating point  Characters ASCII etc.  Logical data 0/1-false/true NSMS2013 Ver.1Systems and Networking22

COMPUTER ORGANIZATIONS CSNB123 Types of Operations Data transfer Arithmetic Logical Conversion I/O Transfer of control NSMS2013 Ver.1Systems and Networking23

COMPUTER ORGANIZATIONS CSNB123 Types of Operations (Cont.) NSMS2013 Ver.1Systems and Networking24

COMPUTER ORGANIZATIONS CSNB123 Types of Operations (Cont.) NSMS2013 Ver.1Systems and Networking25

COMPUTER ORGANIZATIONS CSNB123 Control Operations Branch/jump instruction  Sequential  Unconditional branch  Conditional branch Skip Subroutine / procedure call NSMS2013 Ver.1Systems and Networking26

COMPUTER ORGANIZATIONS CSNB123 Control Operations - Branch Has one of its operands the address of the next instruction to be executed A sequence of code in a computer program which is conditionally executed depending on whether the flow of control is altered or not (at the branching point)  Conditional – the branch is made only if a certain condition is met  Unconditional – a branch instruction in which the branch is always taken NSMS2013 Ver.1Systems and Networking27

COMPUTER ORGANIZATIONS CSNB123 Control Operations - Branch (Cont.) BranchExplanation Sequential Normal execution One instruction after the other Unconditional branch Non-sequential instruction at the designated address is unconditionally executed Conditional branch Non-sequential A branch is made conditionally to another instruction address. If the condition is true, the instruction at the designated address is executed. NSMS2013 Ver.1Systems and Networking28

COMPUTER ORGANIZATIONS CSNB123 Control Operations - Skip Useful in loop control Implies that next instruction to be skipped NSMS2013 Ver.1Systems and Networking29

COMPUTER ORGANIZATIONS CSNB123 Control Operations – Subroutine Also known as procedure call A self-contained computer program that is incorporated into a larger program At any point in the program, the procedure may be called or invoked The processor is instructed to go and execute the entire procedure and then return to the point from which the call took place A procedure allow the same piece of code to be used many times Involves two basic instructions; call and return instruction NSMS2013 Ver.1Systems and Networking30

COMPUTER ORGANIZATIONS CSNB123 Control Operations – Subroutine (Cont.) Call instruction Instructions that branches from the present location to the procedure Return instruction Instruction that returns from the procedure to the place from which it was called NSMS2013 Ver.1Systems and Networking31

COMPUTER ORGANIZATIONS CSNB123 Control Operations – Subroutine (Cont.) NSMS2013 Ver.1Systems and Networking32