What does a processor actually do?

The processor, otherwise called the CPU or CPU (Central Processing Unit), is the basis of any equipment, without which nothing works. The CPU processes processes in binary machine language: simply put, “0” means “no” and “1” means “yes”. Any command is sent to the processor in a combination of two numbers 0 and 1. The CPU processes them one by one, in turn.

In addition to operating commands, the processor also responds to unexpected events. They are sent to it via Interrupts. The CPU interrupts its momentary work, saves the values, and handles the unexpected event first. After that, he again continues to work on the original team.

How the processor works

The processor processes instructions in four stages, described by John von Neumann back in 1945: Fetch, Decode, Fetch Operands and Execute.

  1. fetch: first, the address of the next instruction is read from the command line register in RAM and loaded into the instruction accumulator.
  2. decode: the command decoder decodes the command and activates all the circuitry necessary to execute it.
  3. fetch operands: now all the values ​​and parameters of the command are loaded into the registers that need to be changed. The processor finds these values ​​on the hard disk, cache, or RAM.
  4. Execute: the process is running. This may be, for example, the control of a peripheral device such as a printer, or a computational operation in an information processing device. After the completion of Execute, the loop can start again, that is, the processor starts processing the next instruction.

Read also:

  • How the pedometer works in the phone and fitness bracelet = “content_internal_link”>
  • How Active Noise Cancellation Works in Headphones=”content_internal_link”>