3. Decode

The CPU examines the instruction in the current instruction register (CIR) and 'decodes' it. This means a special part of the CPU called the 'decode' unit will make the rest of the CPU ready to carry out the instruction. It does this by issuing a series of 'micro-instructions'.

fetch decode

For example in the picture above the command in the instruction register is

LDA, #6.

This is a command to load the integer 6 into the accumulator.

The decode unit understands what this means and gets the system ready to carry that instruction out.

Every CPU has an instruction set that defines what the decoder understands as legitimate commands.

All software eventually ends up as a set of commands from within the instruction set.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: writing good assembly code

 

Copyright © www.teach-ict.com