Computer Architecture
Central Processing Unit (CPU) & Microprocessors
CPU is to fetch, decode and execute instructions. The CPU is central to all modern computer systems such as Laptops, Desktops, Games-Consoles, Mobile Devices.
It’s very often installed as an integrated circuit on a single microchip.
The words CPU and Microprocessors are interchangable and means the same thing.
CPU processes data by executing instructions.
| Input |
→ |
Process |
→ |
Output |
| Keyboard used to input a number. |
|
If instruction being executed is ADD, the inputted value is added to existing value. |
|
Result of the calculation is then outputted to the user via monitor. |
Von Neumann Architecture
Von Neumann Architecture consists of:
- Control Unit (CU)
Coordinates how data moves around the CPU. Decodes the instructions fetched from memory.
- Arithmetic Logic Unit (ALU)
Performs Arithmetic Operations.
Performs Logical Decisions.
| e.g. IF X > 5 THEN DO…

-
Random Access Memory (RAM) — Not in the CPU
Temporarily stores instructions that the computer is currently running.
Holds data being processed by the CPU.
-
Registers
Extremely small and has extremely fast memory — located in the CPU. Holds small amounts of data needed as part of fetch-execute cycle. It consists of 5 main registers:
- The Program Counter (PC)
- Holds the memory address of the next instructions to be executed.
- Increments by one as the fetch-decode-execute cycle runs.
- The Memory Address Register (MAR)
- Holds memory address of where data or instructions to be fetched from memory.
- The Memory Data Register (MDR)
- Stores the data or instruction which has been fetched from memory.
- The Accumulator (ACC)
- Stores the results of any calculation taken place in Arithmetic Logic Unit.
- Current Instruction Register (CIR)
- Stores the instructions the CPU is decoding or executing.
-
Buses
Set of parallel wires thru which data are transmitted from one component to another.
There are three types of bus:
- Address — Unidirectional, carries location data.
- Data — Bidirectional, carries data or instructions.
- Control — Bidirectional, carries commands and control signals to tell component when they should be receiving reads or writes.
Fetch Execute Cycle (FDE)
This operation starts by CPU causing the next instruction AND data to be “fetched“ from RAM.
During Fetch:
- During the fetch stage of the cycle, the program counter holds the address of the next instruction to be fetched from memory.
- The address of the next instruction or data to be fetched is copied into the memory address register (MAR).
- The address of the instruction or data is then sent along the address bus and awaits a signal from the control bus.
- Signal sent along the control bus is sent from the control unit (CU) to the main memory.