You are on page 1of 2

An executable binary file contains

The machine instructions to be executed


Data
When a program is run
The executable binary file is copied from the disk drive into memory
The CPU repeated fetches an instruction and executes it using the fetch-decode-
execute cycle
Components of the computer involved in execution
Memory: since the instructions and data are stored there
The bus: since the instructions and data must be transferred to the CPU
The CPU:
o The ALU manipulates both instructions and data
o The control logic decodes instructions and identifies what should happen
during execution
o The PC records where the next instruction is in memory
The PC is initially set to the starting address of the block of memory
o The Instruction Register (IR) holds the current instruction
o The Status Register (SR) records the results of the last instruction
The Fetch-Decode-Execute Cycle
Fetch
o The PC is copied to the MAR
o A read signal is sent to memory
o The instruction is transferred from memory to the MBR
o The PC is incremented
o The MBR is copied to the IR
Several fetch steps may be required to get all the parts of an instruction
Decode
o Part or all of the instruction in the IR is extracted to determine what is to be
done
o Part of the instruction may contain
Data
A memory address to get data from
A memory address to put data
Execute
o The specified operation is performed
o Examples
Arithmetic operation
Logic operation
Read or write data from memory
Change PC to implement jumps
Send data to or from an I/O device
Terminate program (by causing an interrupt)

You might also like