Skip to content
Sahithyan's S1
1
Sahithyan's S1 — Programming Fundamentals

CPU

CPU in today’s computers are microprocessors. A CPU:

  • performs logical & arithmetic operations
  • controls all the other components and subsystems

Arithmetic unit handles arithmetic operations. Logical unit handles logical operations.

Controls the operation of the CPU and rest of the machine. Handles the decoding of instructions.

A type of memory that can hold a unit of data. Can be used for both data processing and control functionalities.

Keeps track of memory address of the next instruction to be executed. Directly connected to ALU.

After an instruction is fetched into the CPU, it is stored in IR for execution. Keeping IR closer to CU (in the scale of micrometers) enables faster execution speed.

Where result of arithmetic or logical operation is stored immediately.

Stores the status of the last operation carried out by ALU.

Can be used to various tasks. Used to store immediate results of the ALU. Number of GPRs vary with the CPU. Usually denoted as “B”, “C” and so on.

CPU Internal Structure

  • There is a secondary ALU after PC. That increments the PC after fetching a new instruction.
  • ALU accepts maximum 2 inputs. One input should come from accumulator.

The process of fetching next instruction while current instruction is still executing. Reduces idle time of CPU.

The process of dividing instruction execution cycle into multiple stages. Those multiple stages will be executed in parallel. Increases thoroughput of the microprocessor.

Allows different resources of the CPU to be used at the same time. CPU, BIOS, OS, and chipset have to support HT technology to use this.

2 or more separate microprocessors, combined onto a single Silicon chip. Higher performance gain compared to HT.