Computer Science

Central Processing Unit (CPU)

Central Processing Unit CPU stands for central processing unit. It is the brain of the computer. It is the most important component of a computer. It is also called processor. A computer cannot work without CPU. All computers must have a central processing unit.

CPU is located on the motherboard. It carries out most of the work of a computer CPU performs all operations on data according to the given instructions t executes instructions and tells other parts of computer what to do. Most of the work consists of calculations and data transfer.

All functions of processor usually are on a single chip in personal computers. The manufacturers of processor chip are also providing multi-core processors. A single chip that contains two or more separate processors is known as multi-core processor. Multi-core processing reduces access time and increases overall processing For example, if one cure is busy in executing an instruction, another can handle incoming data or instructions. It reduces energy consumption over multiple separate processors. Multi-core processors include dual core, quad-core, six-core and eight-core. AMD and Intel offer multi-core processors.

Two most common multi-core processors are as follows:

1. Dual-core Processor: A dual-core processor chip contains two separate processors.

2. Quad-core Processor: A quad-core processor chip contains four separate processors.

Multi-Core Processor
Multi-Core Processor

CPU consists of two main units known as arithmetic & logical unit and control un These components work together to perform processing operations.

ALU (Arithmetic and Logic Unit)

ALU is a part of CPU. Actual execution of instructions takes place in this part arithmetic and logical operations are performed in ALU. It consists of two following units

i. Arithmetic Unit

Arithmetic unit of ALU performs basic arithmetic functions suc addition, subtraction, multiplication and division.

ii. Logic Unit

Logic unit of ALU performs logical operations like comparing data items to find which data item is greater than, equal to, or less than the other.

Control Unit

Control unit is an important component of CPU. It acts like a supervisor of the computer. It does not execute program instruction by itself. It controls and coordinates all activities of computer system. It performs this task by issuing necessary commands to different components of computer. Control unit also provides clock pulses that are used to regulate and control all operations in the computer system. regulate a

Important operations performed by control unit are as follows:

    1. It fetches instructions from the main memory.
    2. It interprets the instructions to find what operation is to be performed.
    3. It controls the execution of instructions.

3.1. Machine Cycle

Machine cycle is the sequence of actions performed by the processor to execute each The four steps of machine cycle are fetch, decode, execute and store.

1. Fetch: Instruction fetch is a process of getting an instruction from the memory to execute it. This process is performed by the control unit.

2. Decode: The control unit decodes the instruction. This process examines the nature of instruction to determine what further operations should be taken. CU directs to move the required data from memory to ALU.

3. Execute: After decoding the instruction and getting the required data, CPU finally executes that instruction. The instruction is executed by ALU.

4. Storing: The process of writing the result to the memory is called storing.

Machine Cycle
Machine Cycle

These four operations collectively are called a machine cycle or instruction cycle. The time required to fetch and decode instruction is called Instruction time or i-time. The time required to execute and store is called Execution time or e-time.

3.2. Instruction Set

A set of bits that tells a computer to perform a specific task is called instruction Instruction code. The instructions are loaded into main memory, CTU fetches instructions from memory to execute. Each CPU provides a number of instructions to perform different operations. The set of all instructions provided by the CPU is called Instruction set.

Types of Instructions

The modern computers support different types of instructions as follows:

1. Data Transfer Instructions

The data transfer instructions are used to transfer data from one location to the location in the Computer These instructions do not change the data The data is commonly transferred between the registers or between registers and memory.

Some examples of data transfer instructions are as follows:

MOV (Move):  It is used to transfer data from memory to register, register to memory and register to register It is also used to store the result of calculation For example, the following instruction will move the value of register 1 to the register A. MOV A, B

LD (Load):  It is used to load a register with the contents from the memory. For example, the following instruction will load 25 in register A. LD A, 25

XCHG (Exchange):  It is used to exchange the values of two registers. For example, the following instruction will exchange the values of CX and BX: XCHG CX, BX

2. Data Processing Instructions

The data processing instructions are used to perform arithmetic and logical calculations on data. The calculations are performed on the values of the registers. The result is also stored in a register.

Different types of data processing instructions are as follows:

Arithmetic Instructions:  These instructions are used to perform different arithmet operations on data. ADD instruction is used for addition, SUB for subtraction, MUL for multiplication and DIV for division.

Logical Instructions:  These instructions are used to perform logical operations on data. These instructions include AND, OR and NOT etc.

Shift Instructions:  These instructions are used to transfer bits of an operand from left to right or right to left.

3. Program Control Instructions

The program control instructions are used to control the execution of different instructions in a program. They can be used to change the order in which instructions executed. Some examples of program control instructions are as follows:

JMP (Jump):  It is used to move control from one place to other in a program.

Loop:  It is used to execute a statement or set of statements repeatedly for a number of times.

3.3 System Clock

System clock is an electronic component. It generates electric signals at a fast speed it controls all functions of the computer using clock ticks. These ticks of system clock are known as clock cycle and set the speed of CPU. Computer clock can tick from millions to billions times in one second.

The speed at which the CPU executes instructions is called clock speed or clock rate Processor speed is measured in MHz and GHz. A Hertz means machine cycles per second. Megahertz (MHz) is a million of cycles per second. Gigahertz (GHz) means a billion of cycles per second. For example, a processor of 3.0 GHz can work at a rate of 3 billion machine cycles per second.

The power of a CPU is determined by the speed at which it processes data. System clock is one of the major factors that affect a computer speed A CPU that has a higher clock speed can process more instructions per second than a CPU with a lower clock speed. For example. Core i7 processor running at 3.2 GHz will be faster than Core 17 processor running at 2.66 G1 Iz if all other components remain the same Today’s fastest CPUs have clock speed of more than 3 GHz.


The speed of workstation and some server computers is measured in MI’S, MIPS stands for millions of instructions per second. Workstations perform at 100 MIPS or more. Mainframes perform at 200-1,200 MIIS. MIPS is also applied to PCs Computers can operate up to several thousand MIPS.

Supercomputer processing speed is measured in flops FLOPS stands for floating point operations per second. Supercomputer applications are often scientific and frequently perform floating point operations. Floating point operations accommodate very small or very large numbers. The speed of modern supercomputers is more than a trillion FLOPS. The speed of IBM’s Blue Gene/L is 70.72 teraflops (tera-trillion) per second.

3.4 Types of CPU architectures

Two types of CPU architectures are as follows:.

1. CISC Architecture

CISC stands for complex instruction set computing It is the traditional type of CPU architecture that supports a large number of instructions. It executes complex instruction more quickly. It uses more complex circuits to decode the instructions. It requires multiple clock cycles to execute an instruction.

CISC is a complex architecture due to the the instructions used it hardware level. Intel’s 486 and Pentium series examples of CISC processors.

2. RISC Architecture

RISC stands for reduced instruction set computing. It only contains the most frequently used instructions. It executes sample instructions mere quickly than CISC CPU It completes most of the instructions in one machine cycle. It allows the processor to handle several instructions at the same time.

RISC architecture uses less power. It can be developed in less time because its design is simple as compared to a CISC processor “Some examples of RISC processors are IBM Power PC, Sun SPARC and tablet PCs.

1. CISC instructions utilizes more cycles.1. RISC instructions utilizes Less cycles.
2. It has more complex instructions.2. It has less complex instructions.
3. Its implementation is slower.3. Its implementation is faster than CISC.
4. It is typically used in personal computers.4. It is typically used in tablets and smartphones etc.
5. It uses more power.5. It uses less power.

3.5 Pipelining

Pipelining is a technique in which CPU fetches the next instruction before it completes the machine cycle for the first instruction. Modern computers use pipelining technique to process multiple instructions at the same time It results in faster processing and increases the performance of the computer.

Without pipelining, the processor fetches, decodes, executes and stores only one instruction at a time. The CPU waits until an instruction completes its all four stages and then executes the next instruction.

3.6 Registers

A register is a small high-speed memory inside CPU. The CPU contains a number of registers, Registers are used to store information being processed. These are temporary storage areas for instructions or data. The temporary results during processing are also stored in registers. Each register has a predefined function.

Register size determines how much information it can store. The size of registers is in bytes. Each byte can store one character of data. A register can be of 1, 2, 4 or 8 bytes, Bigger size of register increases the performance of CPU.

Control unit manages registers for the following purposes:

  • Input the instructions or data
  • Store the instructions or data
  • Transfer the instructions or data
  • Perform arithmetic or logical operations at high speed.

Different registers are as follows:

1. Memory Address Register (MAR)

The memory address register is used to store memory address being used by the CPU, CTU stores the address of memory location in this register in order to read or write data to it.

2. Memory Buffer Register (MBR)

The memory buffer register is used to store the data coming from the memory or going to the memory. It acts as a small memory buffer. It ensures that the processor and memory work without being affected by any difference in operation.

3. Program Counter (PC)

The program counter is used to control the sequencing of the execution of instructions. It stores the address of the next instruction to be fetched for execution. The value of program counter is loaded into memory address register that fetches the instruction from the memory The value of program counter increments when the instruction is fetched. It now points to the next instruction.

4. Instruction Register (IR)

The instruction register is used to store the instructions that are fetched from memory for execution. An instruction register holds the instructions to be decoded by the control unit. The timing and control logic generate the sequence of signals to execute the instructions.

5. General purpose Register

General-purpose registers are used in mathematical and logical operations. These registers are part of ALU. Different general-purpose registers are as follows:

Accumulator Register:  It is used for arithmetic and data operations.

Base Register:  It is used for arithmetic and data movement. It has special addressing capabilities.

Counter Register:  It is used for counting purpose. It acts as a counter for repetitions or loops.

Data Register:  It is used for division and multiplications.

The size of these registers can be 1 to 4 bytes The two-byte data registers AX, BX, CX DX contain two parts of 8-bit size. These parts are separately accessible The lower-order bytes are AL, BL, CL and DL. The high-order bytes are AH, BH, CH and DH. The modern use the registers of 4 bytes (32 bits) known as EAX, EBX, ECX and EDX.

6. Address or Segment Registers

Segment is a block of memory. Address or segment registers are used to store the address of memory blocks of the instruction being executed. There are four segment registers. These are CS, DS, ES and SS. The size of each register is two bytes. These registers are used with IP register or index registers DI and SI.

Different segment registers are as follows:

Code Segment (CS):  It stores base location of all executable instructions in the It is used with IP register to fetch instruction from memory.

Data Segment (DS):  It is used as the default base location for memory variables. It is used with Di or Sl registers to refer to the data in memory.

Extra Segment (ES):  It is used as an additional base location for memory variables.

Stack Segment (SS):  It contains the base location of the current program stack.

7. Stack Control Register

A stack is set of memory locations in which data is stored and retrieved in an order. This order is called Last-In-First-Out (LIFO). The data item stored at the top of stack is retrieved before retrieving the item below it.

Stack control registers are used to manage stack in computer. Two special registers SP and BP are used for this purpose. DI SI, SI & BP can either be used as 2 byte register or 4 byte registers. The names of 4-byte stack control registers are EDI, ESI, ESP and ERP.

8. Flag Registers

Flag registers are used to indicate a particular condition. The size of flag register is one or two-byte Bach byte of flag registers is further divided into eight bits. The data in flag register is stored in 8 distinct bits. Each bit of the flag register indicates a flag or condition. Some flag registers are Zero flag, Carry flag, Parity flag, Sign flag and Overflow flag.

3.7 Processor Cooling

Proper cooling for processor is very important. Excessive heat can damage a processor or cause problems. The computer provides cooling system for the processor. Heat sink. cooling fans and liquid cooling system are used to keep the processor from overheating .

Heat sink is composed of metal or ceramic material and is attached to a processor chip. It absorbs its heat and dissipates it into the air to avoid overheating. Many heat sinks also have fans to distribute the air dissipated by the heat sink. A heat sink without a fan is called a passive heat sink. A heat sink with a fan is called an active heat sink. Heat sink and cooling fans are normally installed above the processor. A system unit has one or more case fans to keep the entire system cool. Some computers also use liquid cooling system. It circulates liquid through tubes in the system to carry the heat away from the processor.

A cooling pad can be used to further reduce the heat generated by the laptop. It connects to a USB port to power a small fan that helps keep a good airflow under the laptop. It is normally used when the laptop is unable to sufficiently cool itself.

3.8 Coprocessors

A coprocessor is a special additional processor chip that helps main processor to perform specific tasks. The use of coprocessor increases the performance of a computer. A hype of coprocessor is known as floating-point coprocessor or math coprocessor. It improves the working of engineering, scientific and graphics applications. Coprocessors were first seen on mainframe computers. Most of the computers used today also have coprocessors.

3.9 Parallel Processing

A method that uses multiple processors or multi-core processor to speed up processing is called parallel processing. These processors work simultaneously to complete a program. It increases the performance of the computer system.

Parallel processing divides a task into multiple smaller tasks. Each processor solves the smaller task independently at the same time. Parallel processing is used in some personal computers with dual-core or multi-core processors Supercomputers use parallel processing in complex applications like weather forecasting etc.

The two types of parallel processing are as follows

1. Single Instruction/Multiple Data (SMID)

This method executes the same instruction on many data values simultaneously.

2. Multiple Instruction/Multiple Data (MIMD)

This method connects a number of processors that run different programs or parts of a program on different sets of data.

3.10 Comparison of Processors

The most popular manufacturers of processor chip are Intel, Advanced Micro Devices (AMD), IBM and Motorola. The processors of these manufacturers are normally identified by a model name or model number.

Intel is the world’s largest chip manufacturer and supplies microprocessors for all types of computers. Intel introduced the world’s first microprocessor in 1971 called 4004. Intel’s 8088 processor powered the original IBM PC. Intel has introduced many microprocessors such as Core 2 Quad and Core 2 Duo that have been used by most major computer manufacturers. The Intel Core family of processors are used in most high performance computers. The less expensive computers use the processors of Pentium or Celeron. The Xeon and Itanium processors are used in workstations and server computers. The Atom processors are used in tablets and handheld computers.

AMD (Advanced Micro Devices) is another popular processor manufacturer. It is the main competitor of Intel. It provides less expensive processors than Intel. The Phenom and Athlon X2 processors are used in desktop and laptop. The Opteron processor is used in servers and workstations. The Fusion processor is used in tablets.

ARM processors are designed and licensed by ARM Holdings. It is a British company founded by Acorn Computers, Apple Inc and VLSI Technology. Its RISC processors are manufactured by Apple, NVIDIA, Samsung and Nintendo. ARM processors are used in many mobile phones and other handheld devices such as Apple iPad.

The processor chips include technologies for improving processing performance. For example, multi-core chips are used in most processors. Some processors of Intel contain Hyper Threading (HT) technology. This technology allows a processor to mimic the power of two processors. It improves the processing power and time. Most processors contain built in instructions to improve the performance of multimedia and 3D graphics.

The processors for notebook computers contain the technology for wireless capabilities and improve battery life. Intel’s Centrino, Centrino Pro and Centrino Duo technologies provide wireless capabilities for notebook computers and Tablet PC. The mobile devices often use a processor that consumes less power and provides high performance.

Another type of processor is known as system on a chip. It combines the function of a processor, memory and video card on single chip. It is usually used in Table PCs, networking devices, portable media players and games consoles. Its goal is to create a processor that has a faster clock speed and consumes less energy.

3.11 Benchmarking

Benchmarking is a technique used to test the overall speed of a microprocessor. The results of these tests are known as benchmarks. The results of benchmarking are usually available on the Web and published in computer magazine articles. Benchmarking can provide comparison information for selecting or configuring computer systems.

Windows 7 and 8 offer a set of benchmarks called Windows Experience Index. It checks a computer’s overall performance, and the performance of components such as its processor, memory, graphics and storage system.

Related Articles

Leave a Reply

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

Back to top button