What is Computer Processor (CPU)? How processor works? Computer Processor fully explained!

What is Computer Processor (CPU)? How does processor work? Computer Processor fully explained!

What is Computer Processor (CPU)? How does processor work? Computer Processor fully explained!

Hello friends!
Hope you all be fine!


Today, I feel like talking about the processor. In this article, I've explained the basic functioning of the processor in detail from scratch to an advanced level.

Let's start with the basic definition!

What is the processor?

Basically, the processor is an electronic circuit (silicon chip) that is responsible for performing various operations such as mathematical calculations, logical reasoning, managing hardware & drivers, and many more computing tasks. It takes input from humans through input devices, processes it then displays the output through the output devices. It ensures proper control & coordination between software and hardware. It is also known as microprocessor or CPU.

Intel V/S AMD Ryzen processor


Let's move further!

Some Terminologies associated with a processor-

1. Cores -

This is a very common term related to a processor. Cores refer to the number of independent physical processing units installed on the chip. You can also relate cores with your hands. For eg. Quad-core means four hands. By using cores, a processor can-do multiple works at the same time or a single work using multiple hands. It breaks a set of problems into discrete independent parts and assigns it to different cores to solve individually. The processor makes intelligent decisions and assigns a task to different cores. But here a myth is very common that "MORE CORE MEANS BETTER PERFORMANCE". It isn't true always. Actually, it depends on the type of work/task/operation and processor itself. Every work can't be broken into fragments to solve each individually, sometimes it depends on its preceding part. So in that case, it doesn't matter how many cores do you have? the process will be slow.

2. CPU Fabrication - 

A processor contains millions of transistors and logic gates on its chip. It is so fabricated, making the distance between the two transistors infinitesimally small. You've often heard about the term 10nm, 12nm, 14nm, etc in a processor. What does it mean? It is nothing but the size of transistors used in the fabrication process. Smaller the size of transistors, more powerful and power-efficient processor will be. 

For eg- A 10 nm processor will consume less power, give better performance, and also produce less heat as compared to a 12 nm processor. 

3. Clock Speed (Frequency) -

Every CPU has an inbuilt clock which is responsible for switching (ON & OFF) of the circuit. In general, the faster the switching, the quicker data will flow. Suppose if you have a CPU having a clock speed of 2GHz then it means that the circuit will switch (ON & OFF) 2 billion times in a second, then it'll complete its one cycle. But you can't say a processor having greater clock speed will work faster always. Actually, it depends upon the processor, how much work it can do in one second or in one cycle. 

Here one term is very common i.e overclocking. It is the process of increasing the clock speed of the CPU to a certain value certified by the manufacturer. If you overclock your CPU then it'll generate more heat than usual, so you've to manage a proper cooling system for that. 

4. Architecture -

In simple words, we can say that it is the map of the processor. Before building anything firstly a map is made, that clarifies at which position which sections/blocks will be made. This applies to the processor also. The position of each component of it is mention in its architecture and then it gets manufactured accordingly. Better the map better will be the utilization of the processor. The ARM architecture is a company that designs the map of processors. 
For eg- ARM Cortex A7, A15, A53, A72, etc are few versions of ARM Architecture.

5. Cache Memory

Computers have three types of memory - Primary, Secondary, Cache memory. Among these three cache memory is the fastest memory but also has the least capacity (2MB ~ 20MB). There are three types of cache memory available Level 1 (L1), Level 2 (L2), Level 3 (L3). Every core of CPU has L1 and L2 cache and L3  is a separate cache that is shared among all cores. L1 is the fastest cache that lies inside the processor while L2 lies outside the processor. The files which are frequently required by CPU to perform tasks/operations are stored in the cache memory. As it is the fastest memory, even faster than RAM that's why all frequently required files are stored here for smooth execution.

6. Threads -

Thread is the virtual version of CPU cores. It uses a technology called Hyper-Threading (developed by Intel) to convert one physical core into two virtual cores. So, if you've dual-core CPU then by using this technology it can be converted into quad-core. But the number of physical cores will remain the same. This will just make the functioning and flow of data smooth slightly.

7. Number of Bits -

It refers to the size of data-type, a processor can work on at a time for eg- 32-bit, 64-bit, etc. More the number of bits, better and faster will be processing. But here one factor comes into play i.e., for complete utilization of a 64-bit processor, you must have a 64-bit operating system (OS) and 64-bit applications. Then in that case only you can get the full benefit of it. If you have 64-bit CPU while your OS is of 32-bit then your 64-bit CPU will of no use, it'll not work at its full potential. 

Now, I think you all have understood these terminologies related to processor/CPU. If still you've doubts in any of these or you want a further explanation, then feel free to leave a comment in the comment section below. I'll reply to your comment.

All the above-mentioned things should be checked in a processor before buying it. Giving one or two above mentioned things good in a processor won't help, there should be a proper balance and coordination between them.

Working of Processor (CPU)-

A processor communicates with RAM, Hard disk, and other hardware components to work efficiently. It guides, control, directs, and governs the hardware components to make complete coordination and flow of data. The following diagram is a block diagram of CPU that helps you understand the flow of data inside the CPU.

Block Diagram of CPU (Sun parts of CPU)- ALU, CU, Registers


#CPU has some sub-components that help in carrying out the processing of tasks  -

1. Arithmetic Logic Unit (ALU)

All arithmetic and mathematical calculations and operations are performed by ALU such as (+,-,/,*, etc). It also performs some logical operations including (<,>,=,<=,>=,=!). 
Let's take an example to understand it. Suppose we enter two numbers in our computer and give a command to add them. Then these two numbers firstly get stored in RAM, after that CPU will fetch those numbers from RAM. Then, the ALU of CPU performs addition operation then put the result back into RAM from there it gets displayed to the user. This is how it works. 

In the same way, logical operations work. The numbers to be compared are sent to from RAM to CPU and then ALU performs the logical operation on those numbers to determine whether the first number is equal, smaller, larger than the second number. The result is either TRUE or FALSE. In binary TRUE is denoted by 'one' and FALSE is denoted by 'zero'.

The above examples are basic that are described to explain the function of CPU easily. In the same way, complex operations get executed but for that millions of instructions are performed by CPU.

2. Control Unit (CU) -

As the name suggests it controls and guides the interpretation, flow, and manipulation of data and information. Another big function of CU is program execution
Let's also understand it by an example. We know that a program or software is nothing but a set of instructions. Whenever we run a program, those set of instruction gets loaded into RAM and then CU fetches all instruction from there and executes one after the other. In this way, it executes a program. It also controls the flow of data from the input devices to memory and from memory to output devices.

3. Registers

Registers are the fastest memory even faster than cache memory. It is located inside the CPU. These are small and temporary memory units for holding data. CPU stores important processing information and data in registers during the time of processing. Memory address and instruction can also be stored in registers. 
Suppose you have given the command to multiply (4589*7896) then while processing the result of multiplication will be stored in the register. 

Here one can gets confused between register and cache memory
Let me clear this!
The files which are frequently required by CPU for processing are stored in cache memory while the important results during processing something are stored in registers temporarily by CPU itself.

I hope you all get a basic understanding and idea of How the processor (CPU) works? If still, you've any doubt and query or I've forgotten something to mention here then feel free to leave a comment in the comment section below regarding the same.

Let's wrap-up here!

Till then stay tuned at TechStoic for such interesting blogs.

Author - Aman Tiwari
Follow me on Instagram @tech_stoic
Follow me on Twitter @tech_stoic

Comments

Post a Comment

Popular posts from this blog

What is the dark web? How to access it and what you'll find there?

MICROSOFT WILL STOP SUPPORT FOR INTERNET EXPLORER 11