Fetch-Decode-Execute Cycle Flashcards

1
Q

What is the Fetch-Decode-Execute cycle?

A

Is the basic method used by the CPU to carry out a single instruction contained in a computer program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the 5 registers involved in Fetch-Decode-Execute cycle

A
The MDR (Memory Data Register)
The MAR (Memory Address Register)
Program Counter
Accumulator
Instruction Register
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the fetch operation?

A

Is responsible for getting an instruction or data from main memory into the CPU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What happens in the Fetch cycle?

A

The program you want to run is loaded into RAM
The starting address location is loaded into the program counter
The program counter value is loaded into the MAR
The control unit then loads the address on to the address bus
The control unit then sends a signal to RAM to read the address
The instruction at that address is passed across the data bus and copied into the MDR
The instruction in the MDR is copied into the instruction register, so that it is ready to use during the decode stage
The program counter is incremented by one location so that it’s ready to begin the next fetch cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens in the Decode cycle?

A

The control unit reads the Instruction Register, and makes sure that it is an instruction that the CPU can carry out i.e. it is in its instruction set. If it is, then various parts of the CPU are prepared for the next stage, which is the ‘Execute’ stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What happens if the address of the instruction does not match up on the instruction set?

A

It would flag an error but more likely it will crash the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What happens in the Execute cycle?

A

The CPU executes the instruction that has been decoded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly