0% found this document useful (0 votes)
173 views

Chapter 12 (Instruction Sets Characteristics and Functions)

The document discusses instruction sets and their characteristics and functions, describing what an instruction set is, the elements that make up an instruction like operation codes and operands, and various design decisions in instruction sets regarding the number of addresses, instruction formats, register usage, and data types supported. It provides examples of common instruction types like arithmetic, logic, data movement, and flow control instructions to illustrate characteristics of instruction sets.

Uploaded by

ki.to4757
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views

Chapter 12 (Instruction Sets Characteristics and Functions)

The document discusses instruction sets and their characteristics and functions, describing what an instruction set is, the elements that make up an instruction like operation codes and operands, and various design decisions in instruction sets regarding the number of addresses, instruction formats, register usage, and data types supported. It provides examples of common instruction types like arithmetic, logic, data movement, and flow control instructions to illustrate characteristics of instruction sets.

Uploaded by

ki.to4757
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

+

William Stallings
Computer Organization
and Architecture
10th Edition
© 2016 Pearson Education, Inc.,
Hoboken, NJ. All rights reserved.
2

Chapter 12
Instruction Sets: Characteristics and
Functions
+

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.


What is an Instruction Set?
• The complete collection of instructions that are understood by a
CPU
• Machine Code
• Binary
• Usually represented by assembly codes

3
Elements of an Instruction
1. Operation code (Op code):
– Specifies the operation to be performed
– Do this
• Source Operand reference:
– one or more source operands, that is, operands that are inputs for the operation.
– To this
1. Result Operand reference
– The operation may produce a result
– Put the answer here
2. Next Instruction Reference
– tells the processor where to fetch the next instruction after the execution of this instruction is complete.
– When you have done that instruction, do this...

4
Instruction Cycle State Diagram

5
Instruction Representation
• 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

6
Source and result operands can be in one of four areas:

1) Main or virtual memory 3) Processor register


– As with next instruction – A processor contains one or more
references, the main or virtual registers that may be referenced
memory address must be by machine instructions.
supplied
– If more than one register exists
each register is assigned a unique
name or number and the
instruction must contain the
number of the desired register

2) I/O device
– The instruction must specify the
I/O module and device for the 4) Immediate
operation. If memory-mapped
I/O is used, this is just another – The value of the operand is
main or virtual memory address contained in a field in the
instruction being executed

7
Simple Instruction Format

8
Instruction Types
• Data processing:
– Arithmetic and logic instructions.
• Data storage (main memory)
– Movement of data into or out of register and or memory locations .
• Data movement (I/O):
– I/O instructions.
• Program flow control
• -Test and branch instructions

9
Number of Addresses (a)
• 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

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

11
Number of Addresses (c)
• 1 address
– Implicit second address
– Usually a register (accumulator)
– Common on early machines

12
Number of Addresses (d)
• 0 (zero) addresses
– All addresses implicit
– Uses a stack
– e.g. push a
– push b
– add
– pop c

– c=a+b

13
Number of Addresses

14
Design Decisions (1)
• Operation repertoire
– How many ops?
– What can they do?
– How complex are they?
• Data types
• Instruction formats
– Instruction length
– Length of op code field
– Number of addresses

15
Design Decisions (2)
• Registers
– Number of CPU registers available
– Which operations can be performed on which registers?
• Addressing modes (later…)
– The mode or modes by which the address of an operand is specified.

16
Types of Operand
• Machine instructions operate on data. The most important general categories of data
are:
• Addresses
• Numbers
– Binary Integer/floating point
• Characters
• ASCII: Each character in this code is represented by a unique 7-bit pattern.
• Logical Data
– Dealing with bit level

17
Question 1

18

You might also like