.
It first receives some type of input, typically from an input device (such as a monitor display screen, a keyboard, a mouse, or a microphone) or from an application/system software program (like your web browser or operating system).
CPU
Function of the CPU
Then the CPU is in charge of four tasks:
Fetching instructions from memory, in order to know how to handle the input and know the corresponding instructions for that particular input data it received. Specifically, it looks for the address of the corresponding instruction and forwards the request to the RAM. The CPU and RAM constantly work together. This is also called reading from memory.
Decoding or translating the instructions into a form the CPU can understand, which is machine language (binary).
Executing and carrying out the given instructions.
Storing the result of the execution back to memory for later retrieval if and when requested. This is also called writing to memory.
Finally, there is an output of some kind, such as printing something to the screen.
The process described above is called the fetch-execute cycle, and happens millions of times per second.
Parts of the CPU
CU (short for Control Unit). It regulates the flow of input and output. It's the part that fetches and retrieves the instructions from main memory and later decodes them.
ALU (short for Artithmetic Logic Unit). The part where all the processing happens. Here is where all mathematic calculations take place, such as addition, subtraction, multiplication, and division, as well as all the logical operations for decision making, such as comparing data.
Registers. An extremely fast memory location. The data and instructions that are currenlty being processed during the fetch-execute cycle are stored there, for quick access by the processor.
Peripherals:
What are computer peripherals? A computer peripheral, technically speaking, is any device that connects to the computing unit but is not part of the core architecture of the computing unit. The core computing unit consists of the central processing unit (CPU), motherboard, and power supply. The case that surrounds these elements is also considered part of the core computing unit. So technically, anything that is connected to these elements (CPU) is considered a peripheral.