Running
The CPU runs instructions using a "fetch-execute" cycle: the CPU gets
the first instruction in the sequence, executes it (adding two numbers
or whatever), then fetches the next instruction and executes it, and so
on. Some of the instructions affect the order that the CPU takes through
the instruction sequence .. for example an instruction might direct the
CPU to jump back to an earlier point in the instruction sequence (loops
are implemented this way), or to skip over the next instruction if a
particular condition is true (if-statements are implemented this way).
No comments:
Post a Comment