The central processing unit (CPU) is the main processor of a computer system and executes the instructions that make up software programs. In each instruction cycle it fetches an instruction from memory, decodes it to determine the required operation, executes it with its arithmetic and logic circuits, and writes the result back to registers or memory.
A CPU contains a control unit that coordinates instruction processing, an arithmetic logic unit (ALU) for arithmetic and logical operations, and registers that hold the data being worked on. Modern CPUs have multiple cores that can run several threads in parallel, and they differ from GPUs, which are specialized for large volumes of parallel computation.