Computer Architecture: Instruction Execution and Data Transfer, Lecture notes of Computer Architecture and Organization

An overview of computer architecture, focusing on instruction execution and data transfer. It covers various instruction formats, the instruction cycle, and the role of registers and memory in processing data. The document also discusses the connection of registers and memory to a common bus system.

Typology: Lecture notes

2018/2019

Uploaded on 10/19/2019

Sikandarali
Sikandarali 🇵🇰

4

(1)

3 documents

1 / 75

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Chapter
Dr. Bernard Chen Ph.D.
University of Central Arkansas
Spring 2009
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

Partial preview of the text

Download Computer Architecture: Instruction Execution and Data Transfer and more Lecture notes Computer Architecture and Organization in PDF only on Docsity!

Chapter

Dr. Bernard Chen Ph.D.

University of Central Arkansas

Spring 2009

Purpose of This Chapter

In this chapter we introduce a

basic computer and show how its

operation can be specified with

register transfer statements.

Program statements and

computer instructions

Computer instruction

Field specifying the

operation to be executed

Field specifying the data

To be operated on

5

Instruction code format

Instruction code format with two

parts : Op. Code + Address

Op. Code : specify 16 possible operations(

bits)

Address : specify the address of an

operand(12 bits)

If an operation in an instruction code does not

need an operand from memory, the rest of

the bits in the instruction( address field ) can

be used for other purpose

Op. Code Address 15 12 11 0 instruction data 15 12 11 0 Not an instruction

Number of Operands per

instruction

 (^) No Operands HALT NOP  (^) 1 operand NOT R4 R4  R  (^) 2 operands ADD R1, R2 R1  R1 + R  (^) 3 operands ADD R1, R2, R3 R1  R2 + R  (^) > 3 operands MADD R4,R1,R2,R3 R4  R1+(R2*R3)  (^) Each specify one operation and 1,2, 3 or 4 data locations.

Instructions are read from memory as words  Instructions can be formatted to fit in one or more memory words.  An instruction may contain 

An opcode + data (immediate operand)

An opcode + the address of data (direct addressing)

An opcode + an address where the address of the

data is found (indirect addressing)

 Data only (location has no instructions)

 An opcode only (register-reference or input/output

instruction)

The address register is connected to the memory

  1. Program Counter Increments by units of addresses 0 0 0 0 0 0 0 1 PC

000000000010

  1. The next address is put on the bus and is loaded into the Address Register AR 000000000010
  2. The Bits of the AR are wired directly to the RAM Address lines to enable loading the memory into the Instruction R. Direct access to Memory IR (^1010101010101010) The Program Counter points to the next address of the program

Direct address

  1. Address is selected in memory and its Data placed on the bus to be loaded into the Data Register to be used for requested instructions Occurs When the Operand Part Contains the Address of Needed Data.
  2. Address part of IR is placed on the bus and loaded back into the AR

Indirect address

  1. New Address is selected in memory and placed on the bus to be loaded into the DR to use later
  2. Address is selected in memory and placed on the bus to be loaded Back into the AR Occurs When the Operand Contains the Address of the Address of Needed Data.
  3. Address part of IR is placed on the bus and loaded back into the AR

Indirect address

Direct and Indirect addressing example Addressing Mode

17 Bus s 0 s 1 s 2 16-bit common bus Clock LD LD LD INR OUTR IR INPR LD INR CLR LD (^) INR CLR LD (^) INR CLR LD INR CLR WRITE Address Adder & Logic E DR PC AR CLR 7 1 2 3 4 5 6 Computer System Architecture, Mano, Copyright (C) 1993 Prentice-Hall, Inc. AC Mano’s Computer Figure 5- READ Memory Unit 4096x TR

5-2 Computer Registers

 (^) Data Register( DR ) : hold the operand(Data) read from memory  Accumulator Register( AC ) : general purpose processing register  (^) Instruction Register( IR ) : hold the instruction read from memory  (^) Temporary Register( TR ) : hold a temporary data during processing  Address Register( AR ) : hold a memory address, 12 bit w idth

5-2 Computer Registers

 Program Counter( PC ) :  (^) hold the address of the next instruction to be read fro m memory after the current instruction is executed  (^) Instruction words are read and executed in sequence u nless a branch instruction is encountered  (^) A branch instruction calls for a transfer to a nonconsec utive instruction in the program  (^) The address part of a branch instruction is transferred to PC to become the address of the next instruction  To read instruction, memory read cycle is initiated, and PC is incremented by one(next instruction fetch)