The brain of the computer where all the arithmetic calculations and logical operations take place
Topics Covered in Session 1
Input Unit
Memory Unit
Output Unit
Control Unit
ALU
Registers
Computer System Block Diagram
CPU or Processor
The brain of the computer system
It provides the processing power to the computer
It controls the hardware and executescomputerprograms
CPU or Processor
Intel
AMD
How the CPU works
1. Fetch data and instructions from RAM
2. Decode the instructions
3. Execute the instructions (perform calculations)
4. Store data in memory
CPU Functions
Controls all the activities of the computer system
Executes programs
Fetch data and instructions from RAM
Decode the instructions
Execute the instructions (perform calculations)
Store data in memory
Controls the working of Hardware (receive data from keyboard, send signals to HardDisk, send instructions to RAM, send data over network, Solve errors, etc)
Control Unit (CU)
Directs all the operations of the processor<|>Directs ALU, input/output devices, and the memory<|>Decode programs instructions and generates the necessary signals for ALU
Arithmetic Logical Unit (ALU)
Performs arithmetic calculations and logical operations<|>ALU performs the desired operation on data (as per the operation code OP generated by CU)
Memory Unit
CPU needs high speed memory area to store the frequently used data during the program execution<|>Registers: used to perform operations on data (ex: to store numbers before using them in ALU)<|>Cache Memory L1: used to store frequently used data and instructions
How the CPU executes a program
1. Fetch program instructions one by one from the main memory (RAM)