|

If you have learnt high level language(such
as C++, Java), you may think that the executions of
instruction is simple. This is not the turth.
Actually, a single statement in high-level
language can be hurdreds of operations to be done by the
CPU.
Take "a = b + c;", such a simple addition, as
an example:
The CPU need to:
- Load the content of memory cell
associate with B to the Accumulator
- Add the content of memory cell
associate with C to the Accumulator
- Store the content of accumulator to
memory cell associate with A
You may once again think that the 3
operations above is simple.
Actually, to load the content of B to Accumulator, the CPU
already needs to:
- Transfer the content of
PC to
MAR
- Decode the address held by
MAR
- Transfer the instruction to
MDR
- Instruction are carried to
IR by
MDR
- Increment of
PC
- Decode the Instruction in
IR by
Instruction Decoder
- Operand part of Instruction is
transfered to
MAR
- Decode the Address held by
MAR
- Transfer the content to
MDR
-
MDR carries the content to
Accumulator
You can now see how complicate it is.
Proceed to
: How do CPU
control Peripheral Device
|