Download presentation
Presentation is loading. Please wait.
Published byMatilda Foster Modified over 9 years ago
1
COMPUTER ORGANIZATIONS CSNB123 May 2014Systems and Networking1
2
COMPUTER ORGANIZATIONS CSNB123 Expected Course Outcome #Course OutcomeCoverage 1Explain the concepts that underlie modern computer architecture, its evolution, functions and organization. 2Identify the best organization of a computer for achieving the best performance when asked to make a selection from the current market. 3Demonstrate the flow of an instruction cycle. 4Differentiate types of memory components in terms of its technology and usage. 5Convert integer and floating point numbers to its internal data representation. 6Construct a series of computer instructions to perform low-level processor operations. 7Explain the RISC and CISC computers, and single core and multi-core computers May2014Systems and Networking2
3
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 May 2014Systems and Networking3
4
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 May 2014Systems and Networking4
5
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 May 2014Systems and Networking5
6
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 May 2014Systems and Networking6
7
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 May 2014Systems and Networking7
8
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. May 2014Systems and Networking8
9
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 May 2014Systems and Networking9
10
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 May 2014Systems and Networking10
11
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 May 2014Systems and Networking11
12
COMPUTER ORGANIZATIONS CSNB123 Example May 2014Systems and Networking12
13
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 May 2014Systems and Networking13
14
COMPUTER ORGANIZATIONS CSNB123 Example May 2014Systems and Networking14 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
15
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 May 2014Systems and Networking15
16
COMPUTER ORGANIZATIONS CSNB123 Example May 2014Systems and Networking16 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
17
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 May 2014Systems and Networking17
18
COMPUTER ORGANIZATIONS CSNB123 Example May 2014Systems and Networking18 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
19
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 May 2014Systems and Networking19
20
COMPUTER ORGANIZATIONS CSNB123 Example May 2014Systems and Networking20 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
21
COMPUTER ORGANIZATIONS CSNB123 Number of Address (Cont.) Fewer address require less complex processor Instruction become shorter But contain more total instructions-longer execution time May 2014Systems and Networking21
22
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 May 2014Systems and Networking22
23
COMPUTER ORGANIZATIONS CSNB123 Types of Operands Categories of data Addresses Numbers Integer/floating point Characters ASCII etc. Logical data 0/1-false/true May 2014Systems and Networking23
24
COMPUTER ORGANIZATIONS CSNB123 Types of Operations Data transfer Arithmetic Logical Conversion I/O Transfer of control May 2014Systems and Networking24
25
COMPUTER ORGANIZATIONS CSNB123 Types of Operations (Cont.) May 2014Systems and Networking25
26
COMPUTER ORGANIZATIONS CSNB123 Types of Operations (Cont.) May 2014Systems and Networking26
27
COMPUTER ORGANIZATIONS CSNB123 Control Operations Branch/jump instruction Sequential Unconditional branch Conditional branch Skip Subroutine / procedure call May 2014Systems and Networking27
28
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 May 2014Systems and Networking28
29
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. May 2014Systems and Networking29
30
COMPUTER ORGANIZATIONS CSNB123 Control Operations - Skip Useful in loop control Implies that next instruction to be skipped May 2014Systems and Networking30
31
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 May 2014Systems and Networking31
32
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 May 2014Systems and Networking32
33
COMPUTER ORGANIZATIONS CSNB123 Control Operations – Subroutine (Cont.) May 2014Systems and Networking33
34
COMPUTER ORGANIZATIONS CSNB123 Additional Reference William Stallings, Computer Organization and Architecture: Designing for Performance, 8th. Edition, Prentice-Hall Inc., 2010 May2014Systems and Networking34
35
COMPUTER ORGANIZATIONS CSNB123 May2014Systems and Networking35 This teaching material is belongs to Systems and Networking Department College of Information Technology Universiti Tenaga Nasional (UNITEN) Malaysia 2014
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.