fetch-execute cycle fetch the next instruction decode execute it

45
Machine Code and the Fetch-Execute Cycle

Upload: randolf-joseph

Post on 17-Jan-2016

279 views

Category:

Documents


0 download

Tags:

TRANSCRIPT

Page 1: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Machine Code and the Fetch-Execute Cycle

Page 2: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Fetch-Execute Cycle

• Fetch the next instruction• Decode• Execute It

Page 3: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

PC

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

Page 4: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

PC

2000

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

1 FETCH

Page 5: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2000

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

1 FETCH

Page 6: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2002

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

1 FETCH

Page 7: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2002

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

1 FETCH

Page 8: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2002

MBR

100A

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

FETCH1

Page 9: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2002

MBR

100A

CIR

Op-Code Operand

0001 0000 0000 1010

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

1 DECODE

Page 10: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2002

MBR

100A

CIR

Op-Code Operand

0001 0000 0000 1010

ACCALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

DECODE

Instruction Decoded

1

Page 11: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2002

MBR

100A

CIR

Op-Code Operand

0001 0000 0000 1010

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE1

Page 12: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2002

PC

2002

MBR

CIR

Op-Code Operand

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

2 FETCH

Page 13: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2002

PC

2004

MBR

CIR

Op-Code Operand

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

2 FETCH

Page 14: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2002

PC

2004

MBR

CIR

Op-Code Operand

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

2 FETCH

Page 15: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2002

PC

2004

MBR

8019

CIR

Op-Code Operand

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

FETCH2

Page 16: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2002

PC

2004

MBR

8019

CIR

Op-Code Operand

1000 0000 0001 1001

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

2 DECODE

Page 17: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

2000

PC

2004

MBR

8019

CIR

Op-Code Operand

1000 0000 0001 1001

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

DECODE

Instruction Decoded

2

Page 18: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 00

001A 00

001B 00

001C 00

MAR

0019

PC

2004

MBR

0A

CIR

Op-Code Operand

1000 0000 0001 1001

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE2

Page 19: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

0019

PC

2004

MBR

0A

CIR

Op-Code Operand

1000 0000 0001 1001

ACC

0AALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

2 EXECUTE

Page 20: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2004

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

3 FETCH

Page 21: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2006

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

3 FETCH

Page 22: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2006

MBR

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

3 FETCH

Page 23: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2006

MBR

1005

CIR

Op-Code Operand

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

FETCH3

Page 24: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2006

MBR

1005

CIR

Op-Code Operand

0001 0000 0000 0101

ACC

ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

3 DECODE

Page 25: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2006

MBR

1005

CIR

Op-Code Operand

0001 0000 0000 0101

ACCALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

DECODE

Instruction Decoded

3

Page 26: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2004

PC

2006

MBR

1005

CIR

Op-Code Operand

0001 0000 0000 0101

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE3

Page 27: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2006

PC

2006

MBR

CIR

Op-Code Operand

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

4 FETCH

Page 28: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2006

PC

2008

MBR

CIR

Op-Code Operand

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

4 FETCH

Page 29: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2006

PC

2008

MBR

CIR

Op-Code Operand

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

4 FETCH

Page 30: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2006

PC

2008

MBR

4019

CIR

Op-Code Operand

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

FETCH4

Page 31: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2006

PC

2008

MBR

4019

CIR

Op-Code Operand

0100 0000 0001 1001

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

4 DECODE

Page 32: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2006

PC

2008

MBR

4019

CIR

Op-Code Operand

0100 0000 0001 1001

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

DECODE

Instruction Decoded

4

Page 33: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

019

PC

2008

MBRCIR

Op-Code Operand

0100 0000 0001 1001

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE4

Page 34: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

019

PC

2008

MBRCIR

Op-Code Operand

0100 0000 0001 1001

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE4

Page 35: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

019

PC

2008

MBR

0A

CIR

Op-Code Operand

0100 0000 0001 1001

ACC

05ALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE4

Page 36: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

019

PC

2008

MBR

0A

CIR

Op-Code Operand

0100 0000 0001 1001

ACCALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE4

0A + 05 = 0F

Page 37: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

019

PC

2008

MBR

0A

CIR

Op-Code Operand

0100 0000 0001 1001

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

EXECUTE4

Page 38: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2008

PC

2008

MBR

CIR

Op-Code Operand

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

5 FETCH

Page 39: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2008

PC

2010

MBR

CIR

Op-Code Operand

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

5 FETCH

Page 40: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2008

PC

2010

MBR

CIR

Op-Code Operand

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

5 FETCH

Page 41: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2008

PC

2010

MBR

801A

CIR

Op-Code Operand

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

FETCH5

Page 42: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2008

PC

2010

MBR

801A

CIR

Op-Code Operand

1000 0000 0001 1100

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

5 DECODE

Page 43: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

2008

PC

2010

MBR

801A

CIR

Op-Code Operand

1000 0000 0001 1100

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

DECODE

Instruction Decoded

5

Page 44: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 00

001B 00

001C 00

MAR

001A

PC

2010

MBR

0F

CIR

Op-Code Operand

1000 0000 0001 1100

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

5 EXECUTE

Page 45: Fetch-Execute Cycle Fetch the next instruction Decode Execute It

Instruction Memory

2000 100A (LOAD #10)

2002 8019 (STORE 25)

2004 1005 (LOAD #05)

2006 4019 (ADD 25)

2008 801A (STORE 26)

Data Memory

0018 00

0019 0A

001A 0F

001B 00

001C 00

MAR

001A

PC

2010

MBR

0F

CIR

Op-Code Operand

1000 0000 0001 1100

ACC

0FALU

PC Program Counter

MAR Memory Address Register

MBR Memory Buffer Register

CIR Current Instruction Register

ALU Arithmetic and Logic Unit

ACC Accumulator

5 EXECUTE