What is CPU and How it Works…

When you double-click on an icon to run a program, here is what happens:

The program, which is stored on the hard disk drive, is transferred to the RAM memory. A program is a series of instructions to the CPU. The CPU, using a circuit called memory controller, loads the program data from the RAM memory. The data, now inside the CPU, is processed. What happens next will depend on the program. The CPU could continue to load and execute the program or could do something with the processed data, by control unit displaying something on the screen.

Programming Working

Central Processing Unit is also called microprocessor or processor – is in-charge of processing data. Process of data is depending on the program. It just follows the orders (called commands or instructions) contained inside the program.

Basically it contain three working Units:

  1. Memory Unit
  2. Arithmetic and Logic Unit
  3. Control Unit

Immediate Access Store or Memory Unit

The CPU needs to do this because Backing Storage (e.g. the hard disk) is much too slow to be able to run applications directly. The CPU reads data and programs kept on the backing storage and stores them temporarily in the IAS’s memory

Registers: In a computer, a register is one of a small set of data holding places that are part of a computer processor. A register may hold a computer instruction, a storage address, or any kind of data

Arithmetic and Logic Unit

Fetch: The first step the CPU carries out is to fetch some data and instructions (program) from main memory then store them in its own internal temporary memory areas. These memory areas are called ‘registers‘.

Decode: The next step is for the CPU to make sense of the instruction it has just fetched. This process is called ‘decode’. The CPU is designed to understand a specific set of commands. These are called the ‘instruction set’ of the CPU. Each make of CPU has a different instruction set. The CPU decodes the instruction and prepares various areas within the chip in readiness of the next step.

Execute: This is the part of the cycle when data processing actually takes place. The instruction is carried out upon the data (executed). The result of this processing is stored in yet another register. Once the execute stage is complete, the CPU sets itself up to begin another cycle once more.

CPU Working

Control Unit:

It controls and monitors the hardware attached to the system to make sure that the commands given to it by the application software are used. For example, if you send something to print, the control unit will keep a check that the instructions are sent to the printer correctly.

It controls the input and output of data so that the signals go to the right place at the right time. It controls the flow of data within the CPU – which is the Fetch-Execute cycle described above.


A CPU processes digital data by taking each piece of data one-at-a-time and doing something with it.  The amount of time that it has to process each piece of data called Hertz.

Example: Each cycle is when the clock signal goes from “0” to “1”; we marked this with an arrow.  The clock signal is measured in a unit called Hertz (Hz), which is the number of clock cycles per second. A clock of 100 MHz means that in one second there is 100 million (1 million = 10 Lakh and 1 Billion = 100 Crore) clock cycles.

Clock speed higher:

faster performance but runs hotter and consumes more power.

Clock speed lower:

lower performance, less costly, needs less power – so good for battery life in laptops.


Adjust the clock to run faster than the CPU was really designed for. However, this makes the CPU run hotter and so extra cooling fans


A sensible way forward is to use two CPUs at the same time. The job in hand is shared between the two CPUs. A modern processing device may contain two or even four CPUs. Some chip-making companies call these CPUs ‘cores’. So a dual-core device means it contains two CPUs and a quad-core contains four.

Shahrukh Rafeeq

I'm an Entrepreneur, Freelance Security Consultant, Bug Hunter having years of experience with a deep interest in InfoSec Industry. I love to speak and write about web and mobile application pen-testing, bug bounty. You can reach me at

Leave a Reply

Your email address will not be published. Required fields are marked *