/ˌsiː piː ˈjuː/

noun — "central processor executing instructions."

CPU, short for Central Processing Unit, is the primary component of a computer responsible for executing program instructions, performing arithmetic and logical operations, and coordinating the activities of all other hardware components. It functions as the “brain” of a computing system, interpreting and processing data according to software commands.

Technically, a CPU consists of multiple key units:

  • Arithmetic Logic Unit (ALU): Performs arithmetic operations (addition, subtraction, multiplication, division) and logical operations (AND, OR, NOT).
  • Control Unit (CU): Directs data flow between memory, input/output devices, and the ALU, decoding instructions from programs and issuing commands.
  • Registers: Small, fast storage locations inside the CPU for temporary storage of data, addresses, and intermediate results.
  • Cache Memory: High-speed memory close to the CPU for storing frequently accessed instructions and data to reduce latency.

Operationally, the CPU follows the fetch-decode-execute cycle:

  • Fetch: Retrieves an instruction from memory (RAM) at the address indicated by the program counter.
  • Decode: Interprets the instruction to determine the required operation and operands.
  • Execute: Performs the operation using the ALU or control unit, writing results back to registers or memory.
  • Advance: Updates the program counter to the next instruction.

Example conceptual workflow in pseudo-code:


while (program_counter < program_length):
    instruction = memory[program_counter]
    decoded = decode(instruction)
    result = ALU_execute(decoded)
    registers[decoded.destination] = result
    program_counter += 1

CPUs vary in architecture, including single-core, multi-core, and specialized designs for performance or energy efficiency. Modern CPUs may include integrated graphics processing capabilities, multiple levels of cache (L1, L2, L3), and support for advanced instruction sets (SSE, AVX) to accelerate computational workloads.

Conceptually, a CPU is like the conductor of an orchestra: it reads the musical score (program instructions), directs the musicians (hardware components) to perform their parts, and ensures the resulting performance (system operation) is synchronized and accurate.

See GPU, Cache, ALU, Registers.