Fetch Decode Execute

  • Created by: arrey
  • Created on: 23-12-18 16:48

Fetch

  • The address of the next instruction is copied from PC to MAR.
  • The address is then sent along the Address Bus, then waits for Control Bus signal, the Control Bus sends 'Read' signal to read the data in the address, the data is transferred back into CPU into MDR via Data Bus. The PC also increments.
  • Contents of MDR copied into CIR.

Key point to understand: MAR holds the Memory LOCATION (Address - eg locn 2 in memory) of the INSTRUCTION that will be put into MDR (eg Load #5). All of this will be in binary though.

1 of 3

Decode

  • Instruction held in CIR is decoded by Control Unit. Instruction is split into Opcode and Operand.
  • 'Opcode' is the command. Eg LDA, HLT, OUT, all are commands.
  • 'Operand' is the address, so the memory address relevant to the Opcode. EG if CIR holds ADD 5, the 'ADD' will be part of OPCode but what do we add with? This is stored in the OPERAND (so will be in Memory locn 5)
  • Operand is copied into MAR if address
  • Operand is copied into MDR if data
  • EXAMPLE SAKE: Let's say the program, when decoded, is 'LOAD 10' - let's see how that's executed.
2 of 3

Execute

  • The relevant instruction/opcode is carried out on the operand.

Following the example:

  • 'LOAD 10' involves Memory Locn 10, so '10' will now be stored into MAR
  • Contents of Memory Locn 10 will then be fetched (address, data bus etc) and stored into MDR. Eg the value will be '2' (so 2 was in memory locn 10)
  • The content of the MDR will now be placed into Accumulator, the temporary store point.

NOTE: if we had an 'ADD' or similar operator, the ALU would have been utilised when the OPCODE identified to add / sub the value.

3 of 3

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Fundamentals of computer systems resources »