Fetch-Decode-Execute Cycle See Video: https://www.youtube.com/watch?v=XM4lGflQFvA 1 Fetch Instruction. Where are the instructions stored? On the hard disk. To run them, they are copied into RAM across a bus (set of wires). The instruction is copied from RAM to the CPU. Its copied across the data bus. 2 Decode Instruction. Figure out what the instruction is trying to achieve and signal the circuits that do the required operation. E.g 10001000 10010001 - what does this mean? Its machine code. It means something to the machine. e.g. it could mean add ax,bx inc ax sub cx,2 Decoder circuitry on the CPU does this. 3 Retrieve operands (the numbers) The operands can be in two places - in one of the registers e.g. ax,bx,cx,dx (16 bit) rax,rbx,rcx,rdx (64 bit) - in RAM Inside the CPU the operands are copied along an internal bus to the parts of the CPU that will do the addition/subtraction etc. 4 Execute Instruction. Circuits carry out the addition, or the subtraction or increment, or compare (CMP) or whatever is required. 5 Update Program Counter. This is also known as the Instruction Pointer. It keeps track of the next track of the next instruction to be executed. Add 1 to the value in the program counter. so the program counter now stores the address of the next instruction to be executed.