chap10 - William Stallings Computer Organization and...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon
William Stallings Computer Organization and Architecture Chapter 10 Instruction Sets: Characteristics and Functions
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
What is an instruction set? The complete collection of instructions that are  understood   by  a  CPU Machine Code, i.e. binary Usually represented by assembly codes H * ?
Background image of page 2
Machine Code Assembly code W ,16 (4 ,12 )   101 0010 0010 0000 0001 LDA two   102 0001 0010 0000 0010 ADD three   103 0001 0010 0000 0011 ADD four   104 0011 0010 0000 0100 STA sum   201 0000 0000 0000 0010    two DAT 2   202 0000 0000 0000 0011  three DAT 3   203 0000 0000 0000 0100   four DAT 4   204 0000 0000 0000 0000   sum DAT 0 OP Operand
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Elements of an Instruction 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. ..      Move     $R1, #2        MPY     $R1, pi      Jump    L      …… L    Halt pi  .DAT   3.14
Background image of page 4
Where have all the Operands gone? I/O device ( ¡ * ) Main memory ( Ł “* virtual memory or cache,  ∙“ ) CPU register ( ∙“* )
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Components   memory CPU I/O Bus I/O ALU Control unit registers program data data data data cache data
Background image of page 6
Instruction Representation In machine code each instruction ( ¤e 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
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Simple Instruction Format
Background image of page 8
Instruction Types ( O ∙“* ?) , I/O Data processing ADD, SUB, MPY, DIV ;   AND, OR, NOT ;   SHL,  SHR, . .. Data storage (main memory O “* ) LOAD, STOR, MOVE, . .. I/O INPUT, OUTPUT, . .. Program flow control JUMP ;   CMP, JLE, . . ;   CALL, RETURN ;  ... 
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Number of Addresses (a) L E & · ± , Ł E & · “T± ;  Łe ∙“ 3  addresses Operand 1, Operand 2, Result a = b + c; Not common Needs very long words to hold everything ADD  b, c, a ; b   a+c  add $R 3 , $R 1 , $R 2 $R 3   $R 1 + $R 2  
Background image of page 10
Number of Addresses (b) 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 ADD  a, b  a+b $R, N “*
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Number of Addresses (c) 1  address Implicit second address Usually a register (accumulator) Common on  early machines ADD  a AC   AC+a ‘2 X C *
Background image of page 12
Number of Addresses (d) 0  (zero) addresses a ( a ) Uses a stack e.g.     push a      push b           add           pop c c = a + b a b a+b c + P375
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
P335
Background image of page 14
How Many Addresses More addresses More complex (powerful?) instructions More registers Inter-register operations are quicker
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/31/2010 for the course SOFTWARE I c0327 taught by Professor Li during the Spring '09 term at Nanjing University.

Page1 / 63

chap10 - William Stallings Computer Organization and...

This preview shows document pages 1 - 16. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online