What Is a CPU?
A Central Processing Unit, or CPU, is the piece of hardware in a computer that carries out computer programs by performing arithmetical and logical operations. The CPU of a modern computer is contained on a single chip called a microprocessor. Some computers have more than one CPU, a development known as microprocessing.
Built into the CPU is an instruction set, which is a list of basic operations that the CPU performs. Every operation is represented by an opcode, which is a specific sequence of bits. A computer program is a set of instructions that sends a particular opcode to the CPU to make it perform the represented operation. These mathematical operations are carried out by a subunit of the CPU known as the arithmetic logic unit, or ALU.
CPUs follow a sequence of steps when carrying out the instructions of a program. First, they fetch, or retrieve, information from program memory. The CPU then decodes the operation by breaking the opcode into parts and interpreting its numerical instruction value. In the execution step, the ALU connects to the proper inputs and outputs necessary to perform the requested operation. In the final,"writeback" step, the CPU "writes back" the results of the operation to memory for use as future reference.