A CPU (Central Processing Unit) is the part of a computer that controls all the actions the computer does. It is a small device that contains billions of tiny electronic components. There are 2.600.000 transistors in a 8-core Intel Core i7 processor (transistor count of microprocessors
Most CPUs have a set of built-in "instructions" in them. They define the various actions the CPU can take – things like taking in data from a keyboard, storing data in the computer, sending data to a display, etc.
The basic job of all processors is to execute
various combinations of those simple instructions built into them. Modern computers can perform billions of instructions per second. All actions you can make a computer do will be composed of various combinations of these built-in actions.
Principal components of a CPU include the ALU (Arithmetic Logic Unit) and the CU (Control Unit):
The arithmetic itself is performed in the ALU in the CPU. An ALU is the part of the CPU that performs mathematical functions and logic operations. It does addition and subtraction and moves things around inside the memory of the computer. It can be made to operate when you type exact instructions into a computer. After the ALU executes a math problem, the resulting number is stored in the ACC. The ACC
is simply a storage location for data, not an element of the CPU that performs functions.
The control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.