The CPU processes all of the data and instructions thtat make the system work
The processing power of the CPU depends on different characteristics, like its clock speed, number of cores and cache size
The CPU architecture describes the main components of the CPU, how they interact with each other, and with other parts of the computer system
Von Neumann and Harvard are the 2 main types of architecture. However, you only need to know about Von Neumann
CPUs contain 1000s of gold pins - some transmit data, others supply power to the CPU
The CPU has 3 main parts
CU = Control Unit
CU - The contol unit is in overall control of the CPU. Its main job is to manage the fetching, decoding and execution of program instruction by following the fetch-execute cycle
CU - It controls the flow of data inside the CPU (to registers, ALU, cache...) and outside the CPU (to main memory and input / output devices)
ALU = Arithmetic Logic Unit
ALU - Basically does all the calculation
ALU - It completes simple addition and subtraction, compares the size of numbers and can do multiplications and divisions using repeated addition and subtraction
ALU - It performs logic operations such as AND, OR and NOT and binary shifts - computers process binary data
ALU - It contains the accumulator register
Cache - The cache is very fast memory in the CPU. It's slower than the registers but faster than RAM
Cache - It stores regularly used data so that the CPU can access it quickly the next time it's needed
Cache - When the CPU requests data, it checks the cache first to see if the data is there. If not, it will fetch it from RAM
Cache - Caches have a very low capacity and are expensive compared to RAM and secondary storage
Cache - There are different levels of cache memory: L1, L2 and L3.
Cache - L1 is quickest but has the lowest capacity
Cache - L2 is slower than L1 but can hold more
Cache - L3 is slower than L2 but can hold more
The CPU contains various registers which temporarily hold small bits of data needed by the CPU
Registers are really quick to read / write to, way quicker than any other form of memory
Von Neumann came up with the modern design of a computer in 1945
The Von Neumann architecture describes a system where the CPU runs programs stored in memory
Programs consist of instructions and data which are stored in memory addresses
The program counter (PC) holds the memory ADDRESS of the instruction for each cycle
(check image)
A) Program counter
B) Accumulator
The accumulator stores intermediate results of calculations in the ALU
A) Program counter
B) Accumulator
One of the main features of the Von Neumann architecture is that it only uses one memory for both the data and the instructions
(Arrows show flow of data)
The Memory Address Register (MAR) holds any memory ADDRESS about to be used by the CPU. The address might point to a data or CPU instruction
A) MAR
B) MDR
The Memory Data Register (MDR) holds the actual data or instruction. This may have been fetched from memory, or be waiting to be written to memory
The memory holds the program instructions and the program data
CPUs follow the Fetch-Execute cycle
Essentially, all a CPU does is carry out instructions, one after another, billions of times a second
The fetch-execute cycle describes how it does it
FETCH - 1. Copy memory address from the program counter to the MAR