10 Instruction Sets - Faculty Websites, Slides of Architecture

Instruction Set = The complete collection of instructions that are recognized by a ... Example (IAS – see ch.2): ... In machine code each instruction (incl.

Typology: Slides

2021/2022

Uploaded on 08/01/2022

fioh_ji
fioh_ji 🇰🇼

4.5

(70)

814 documents

1 / 82

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
William Stallings
Computer Organization
and Architecture
8th Edition
Chapter 10
Instruction Sets:
Characteristics and Functions
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52

Partial preview of the text

Download 10 Instruction Sets - Faculty Websites and more Slides Architecture in PDF only on Docsity!

William Stallings Computer Organization and Architecture 8 th^ Edition

Chapter 10

Instruction Sets:

Characteristics and Functions

Instruction Set = The complete collection of instructions that are recognized by a CPU.

Representations:

  • Machine code (Binary/Hex)
  • Assembly code (Mnemonics)

Example (IAS – see ch.2):

00000101 0000000011 ADD M(3)

Where are the operands stored?

  • In the instruction itself —immediate addressing
  • Main memory —or virtual memory or caches, but this is transparent to the CPU
  • CPU register
  • I/O device —If memory-mapped, it’s just another address

00000101 0000000011 ADD M(3)

Instruction Cycle State Diagram (ch.3)

High-level language and assembly language

X = X + Y

compiles into:

  • Load register A with contents of memory address 513
  • Add reg. A w/contents of mem. addr. 514
  • Store reg. A into mem. addr. 513

Conclusion: assembly is closer to the hardware.

Instruction Types

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

Number of Addresses (b)

  • 2 addresses —One address doubles as operand and result —PDP-11 had ADD B,A (p.72) —Reduces length of instruction — Requires some extra work or specialized hardware: Temporary storage to hold some results … although synchronization with a CLK usually solves the problem elegantly:

Source: http://web.njit.edu/~gilhc/ECE394/ECE394-V.htm

Number of Addresses (c)

  • 1 address —Implicit second address —Usually a register (accumulator) —Common on early machines

How Many Addresses

  • 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

Temporary memory location (a.k.a. variable)

Design Decisions (1)

  • Operation repertoire —How many ops? —What can they do? —How complex are they?
  • Data types
  • Instruction formats —Length of op code field —Number of addresses

Design Decisions (2)

  • Registers —Number of CPU registers available —Which operations can be performed on which registers?
  • Addressing modes, i.e. how do we get to the operands (later…)
  • RISC v CISC

Review / reading assignment (will also cover in this week’s lab)

Ch.9 sections:

Please follow all examples with pencil and paper (notebook!)

QUIZ: Problem 10.6 / 386

Write programs to compute and store result in X, on machines with instructions featuring:

  • 0 addresses
  • 1 address
  • 2 addresses
  • 3 addresses

D E F

A B C