CS255 Syllabus
CPU Architecture
- Structure of the CPU of a computer:
- General Purpose Registers:
- very fast memory located inside the CPU
- is usually 10 to 50 times faster than main memory
(located outside the CPU)
- used to store results of calculations
- ALU (Arithmetic and Logic Unit)
- performs arithmetic (+, -, *, /, %) and logic (AND, OR, NOT)
operations
- takes input from general purpose registers and sometimes also from
MBR (memory operand)
- produce output that will be stored in a general purpose register or
sometimes in MBR (result is written to memory)
- certain outcome of the operation (negative, zero, overflow and carry)
are stored in the condition flags in the PSR (see later)
- Communication unit:
- performs data transfer functions between CPU and main
memory
- use two special purpose registers in its task
- MAR = Memory Address Register, contains the address of the memory
location that the CPU wants to transfer from/to.
- MBR = Memory Buffer Register, contains the data being transferred
(MBR works like a temporally transfer depot)
- Control unit:
- controls the operation of all other components
- works like an orchestra conductor
- coordinates the registers, ALU and communication unit
so that they perform their function at the right moment to
achieve the correct functionality.
- Detailed Connection between CPU and Memory