A computer processor is a functional unit that interprets and executes instructions, also known as a central processing unit or cpu, it is the central nervous system of a computer, in contrast to the devices that surround the processor and memory called peripherals, such as keyboards, monitors, Disks, tape drives, etc. are all peripherals.
Each kind of processor has a unique set of operation commands, which can be called the instruction set of the processor, such as store, load, etc. are all operation commands. Computer designers like to call computers machines, so the instruction set is sometimes called machine instructions, and the binary language in which these instructions are written is also called machine language. The central processing unit (Central Processing Unit, CPU) is the computing core and control core of a computer.
CPU, internal memory and input/output devices are the three core components of an electronic computer. Its function is mainly to interpret computer instructions and process data in computer software. The CPU consists of arithmetic unit, controller and register and the bus that realizes the data, control and status of the connection between them.
The operating principle of almost all CPUs can be divided into four stages:
- Fetch
- Decode
- Execute
- Writeback
The CPU fetches instructions from memory or cache memory, places them in an instruction register, decodes the instructions, and executes the instructions. The so-called programmability of a computer mainly refers to the programming of the CPU.