1.4. Computer Architecture

The computer is in a sense a communication system. Data is constantly being moved between the CPU, memory and the various devices. The CPU uses I/O addresses to direct data to particular devices. The devices in turn use interrupts to notify the CPU and operating system of their needs.

../_images/comp_parts.png

1.4.1. The von Neumann Architecture

../_images/vonNeumann.jpg

1.4.2. The CPU Control Unit

../_images/control.jpg

1.4.3. The Arithmetic Logic Unit (ALU)

../_images/alu.jpg

1.4.4. The von Neumann Loop

Fetch Phase

Fetch the next instruction and store it in the instruction register

Execute Phase

The ALU or I/O unit executes the instruction

  • ALU does calculations
  • I/O unit loads or stores data between main memory and registers
PC = <machine start address>;
IR = memory[PC];
haltFlag = CLEAR;
while(haltFlag not SET) {
    execute(IR);
    PC = PC + sizeof(INSTRUCT);
    IR = memory[PC]; // fetch phase
};