Computer Architecture
Computer Architecture
The following is an algorithm that shows the steps in the cycle. At the end the cycle is reset and
the algorithm repeated.
1. Load the address that is in the program counter (PC) into the memory address register (MAR).
2. Increment the PC by 1.
3. Load the instruction that is in the memory address given by the MAR into the memory data
register (MDR).
4. Load the instruction that is now in the MDR into the current instruction register (CIR).
5. Decode the instruction that is in the CIR.
6. If the instruction is a jump instruction then
a. Load the address part of the instruction into the PC
b. Reset by going to step 1.
7. Execute the instruction.
8. Reset by going to step 1.
Steps 1 to 4 are the fetch part of the cycle. Steps 5, 6a and 7 are the execute part of the cycle and
steps 6b and 8 are the reset part.
Step 1 simply places the address of the next instruction into the memory address register so
that the control unit can fetch the instruction from the right part of the memory. The program
counter is then incremented by 1 so that it contains the address of the next instruction,
assuming that the instructions are in consecutive locations
Computer Architecture
Von Neumann Architecture
Von Neumann architecture by John von Neumann 1945 describes a design architecture for an
electronic digital computer Von Neumann realised that data and programs are indistinguishable
and can, therefore, use the same memory. The Von Neumann architecture uses a single processor
which follows a linear sequence of fetch-decode-execute using registers
Harvard Architecture
Consideres splitting the memory into two parts. One part for data and another part for
programs. Each part is accessed with a different bus. This means the CPU can be fetching both
data and instructions at the same time. There is also less chance of program corruption.
The Harvard architecture is a computer architecture with physically separate storage and signal
pathways for instructions and data. Today, most processors implement such separate signal
pathways for performance reasons.
Under pure von Neumann architecture the CPU can be either reading an instruction or
reading/writing data from/to the memory. Both cannot occur at the same time since the
instructions and data use the same bus system. In a computer using the Harvard architecture, the
CPU can both read an instruction and perform a data memory access at the same time, even
without a cache. A Harvard architecture computer can thus be faster for a given circuit
complexity because instruction fetches and data access do not contend for a single memory
pathway.
Also, a Harvard architecture machine has distinct code and data address spaces: instruction
address zero is not the same as data address zero. Instruction address zero might identify a
twenty-four bit value, while data address zero might indicate an eight-bit byte that is not part of
that twenty-four bit value.