What is CPU?

Introduction

CPU (central processing unit) is the brain of computer which is also known as processor. It is responsible to process data and instructions in computer.

Two Components of CPU

Understanding core elements of CPU that work to perform complex operations.

Control Unit
Arithmetic Logic Unit

The process of input, output, processing, storage are performed under supervision of this unit. It decides when to start receiving data, when to stop it, where to store data, etc.

Performs arithmetic operations (addition, subtraction, multiplication) and logic operations (comparing, selecting, matching, merging) of data.

CPU Instruction Cycle

Let’s understand how computer processes or executes instructions.

Fetch
Decode
Execute

The instruction is fetched from register. At the end of fetch operation, it points to the next instruction that will be read on the next cycle.

Determines what instruction to be performed. Control unit sends decoded information as a sequence of control signals to the relevant functional units of the CPU.

ALU performs mathematical or logic functions on the data. Writes the result back to a register.

Registers in CPU

As discussed in the article “What is Memory Unit?”, Register is super-fast storage located within the CPU which temporarily hold critical information needed to quickly fetch, execute, process immediately available tasks.

32-bit Processor: A CPU with a 32-bit register size can handle 32 bits of information at a time.

  • 32-bit processor can support a maximum of 4 GB (2^32 bytes) RAM.

64-bit Processor: A CPU with a 64-bit register size can  handle 64 bits of information at a time which larger as compared to 32-bit processors.

  • 64-bit processor can support a maximum of 18 exabyte (EB) (2^64 bytes) RAM.

One of the main limitations of a 32-bit processor is its inability to support more than 4 GB RAM. 64-bit processors are now generally used in modern computers and devices enabling them to use larger RAM capacities, making them more suitable for handling operations efficiently.

Note:

Arithmetic Logic Unit (ALU) consists of several electronic components, including:

  • Adders and Subtractors to perform addition and subtraction operations on binary numbers.
  • Logic gates, such as AND, OR, and NOT gates to perform logical operations, such as AND, OR, and NOT, on binary data.
  • Multiplexers and Demultiplexers to select and route data within the ALU.
  •