is the way a processor
tackles the job of mundane tasks it is assigned.
Ordinarly the computer
has 4 sections that make it work.
- Input/Output -- for mass storage, printer, keyboards, monitors, speakers, joysticks etc.
- Memory -- For storing programs and data while executing
- Arithmetic Logic Unit -- This does the hard stuff by moving things around and calculating stuff
- Control -- This handles the program flow
When the program runs the controller grabs an instruction which contains and opcode from a sequential location in memory. This opcode tell the controller what step to take next as well as what units to activate.
For instance it could say get a character from input/ouput and place it in memory.
Quite often it is a branching instruction. This tells the controller to replace the program counter contents with a new value. This the flow is broken and a new sequence is begun. This branch is often preceded by a test of memory values or registers against other memory or register or some constant. Then the branch is conditional. The controller leaves the program counter alone if the test is false and execution continues in sequence.