CPU its Functions, Working and Control and Arithmetic Logic Unit

Subject: Computer and Information Technology Application

Overview

The central processing unit (CPU), often known as the processor, sits at the brain of the computer. The main component of the entire computer system is the CPU. It is in charge of deciphering instructions and giving orders to all of the computer's parts. Logic and Arithmetic Units make up the central processing unit. The computer's complete system is controlled by the control unit. All computer operations are guided by this component.

Functions of CPU

The main functions that a Central Processing Unit performs are:

  • It accepts instructions and data from the input unit.
  • It stores the instructions and data into memory unit that are entered from the input unit.
  • It retrieves the relevant instructions and data from memory unit as and when required for processing.
  • It interprets and executes the -instruction one by one and sends commands (signals) to relevant unit.
  • It performs all the Arithmetic and logical operations in the Arithmetic and Logic Unit (ALU).
  • It controls and coordinates the activities of all other units.
  • It sends the results to the output unit when required.

What is CPU?

  • A computer system's processing center, where calculations and decisions are made.
  • A major component of a computer that controls, stores, and utilizes data.
  • A silicon chip with millions of transistors in most cases.

Any computer's central processor unit (CPU) serves as its brain. It runs all of the computations on the computer. The CPU manages the other components of the computer system and carries out machine instructions, manipulating symbols, numbers, and characters. Three primary subsystems make up the central processing unit itself. The Control Unit is the first, followed by the Arithmetic and Logic Unit (ALU) and the Memory Unit. The control unit retrieves instructions one at a time from the main memory to carry out the program command. It also retrieves the necessary data for each command from the main memory, executes the operation, and puts the outcome back in the main memory. A CPU is a tiny, square-shaped component that sits inside a specially designed slot on the motherboard.

Buses of three different types connect the computer system's CPU, major storage, and other components. Data is moved to or from main memory through the data bus. The control bus transmits signals indicating whether to read or write data to or from the main memory address, input device, or output device. The address bus transmits signals for locating a certain address in main memory.

Functions of CPU:

A central processing unit performs these primary tasks:

  • It accepts data and instructions from the input device.
  • It enters the data and instructions from the input unit into the memory unit.
  • When necessary, it accesses the necessary instructions and data from the memory unit to complete the procedure.
  • It decodes each instruction, carries it out, and then transmits commands (signals) to the appropriate unit.
  • In the Arithmetic and Logic Unit, it completes all arithmetic and logical operations (ALU).
  • All other units' operations are coordinated and under its supervision.
  • When necessary, it delivers the outcomes to the output unit.

How a CPU works:

CPU performs the following steps:

  • Fetch
  • Decode
  • Execute
  • Store

A fetch decode execute cycle is how a CPU operates. While carrying out the required instructions for a program, it follows a set of stages. In a memory, instructions are kept, and they do have unique addresses. The first instruction is fetched by the CPU when it turns on from a place determined by the program counter. The instructions that are expected to be carried out by the CPU are tracked by the address or location unit. The control unit decodes this instruction when it is brought into the instruction register. The assembly language codes are converted into binary numbers that the computer can interpret. Decoding is the process in question. The control unit would fetch the operand, perform arithmetic or logical operations on it, or put the outcome of such an operation into a designated memory location based on the instruction. The processor fetches and executes the following instruction after the previous one has been completed. This procedure continues up until the processor issues a halt instruction. A high number of registers, an advanced microprogram control unit, and an advanced arithmetic and logic unit would all be present in a real-world processor. The Pentium III and Pentium IV CPUs from Intel are now the most powerful ones in use.

What is a microprocessor?

The term "microprocessor" refers to a very large scale integrated circuit technology that merges the computer memory, logical, and control unit on a single chip. The Pentium Pro CPU offers mainframe and supercomputer-like processing capabilities and has more than 5 million transistors. Word length, clock speed, and data bus width are used in combination to gauge the microprocessor's speed. The speed of a computer increases with word length (32 bits or 4 bytes in a single cycle). Megahertz (MHz), which stands for millions of cycles per second, is a unit of measurement measuring the rate at which instructions are processed. A speedier computer has a greater clock speed. The movement of the data between the CPU, primary storage, and other devices through data bus determines how much data can be moved at a time.

The data bus width indicates the speed of the machine. By adopting Reduced Instruction Set Computer (RISC) in their design, microprocessors can be made quicker. Only the most commonly used instructions are embedded in RISC computers. A computer has many different types of processors inside. The price of the computer is influenced by speed and performance. Each manufacturer has a different process for designing and making its processor, which could affect how well they function. An instruction may occasionally not be directly accepted by another processor after being created for it.

Control Unit (CU):

  • The control unit, which regulates the CPU's functions, is often an electrical system inside the CPU. Depending on the type of CPU, a control unit may perform different tasks. Different CPUs have differing degrees of architecture that define the control unit's functions.
  • It manages all processor control signals. All input and output flow is governed by it, and it also generates code for instructions from microprograms, directs other units and models, and gives timing signals.
  • Because it regulates the computer system's general functionality and operation, it is known as the "heart" of the computer system. All other units are under its direction, and it gives them instructions on how to operate in a proper manner and coordinate different tasks.
  • It tells the input device to send the information and commands first to the main memory, then to the arithmetic and logic unit (ALU).
  • The control unit searches the main memory for the necessary data, loads it into a register, tells the ALU to carry out the necessary operation, and loads the outcome into the main memory.
  • It delivers the ALU's processed output to the memory unit for storage. and assigns it to the printer or the visual display unit.
  • The arithmetic logic unit (ALU), the memory unit, and the peripheral devices are some of the components of the computer system that are coordinated by the control unit.
  • Additionally, it manages the data flow into, out of, and within the primary storage in accordance with the directives provided by the user.
  • The entire monitoring of a computer system is done by the control unit.
  • To efficiently and swiftly carry out its control functions, the control unit includes four main components:
    • Instruction Register
    • Decoder
    • Address Register 
    • Instruction Counter

The instruction register receives instructions one at a time to be performed efficiently in the required order. The decoder then decodes the operation code after receiving the operation code from the instructions. And in order to carry out the operation, it turns on the relevant circuits in the arithmetic and logic unit. Data from the location indicated in the instruction can be transferred to a specific accumulator for the arithmetic and logic unit using the address register.

It is regarded as the most significant component of the CPU since it supervises and directs the operations of all other computer system components. For instance, it accepts the information and commands from the input device and stores them in the computer's main memory. It carries out each of these tasks by sending commands to the appropriate computer component.

The execution of instructions issued to the computer is also under the direction of the control unit. It retrieves the data and instructions from the memory unit. Additionally, it decodes and carries out each instruction individually. The results are likewise sent to the output device by the control unit, which also transmits signals to it.

Arithmetic Logic Unit (ALU)

  • Arithmetic Logic Unit is the name of the component that executes mathematical and logical operations including addition, subtraction, shifting operations, and logical instructions like AND, OR, XOR, and NOT operations (ALU).
  • A complicated and digital type of circuit called an ALU is found inside a CPU.
  • The process controller, RAM, and I/O devices are all directly accessible to the ALU (both as input and output).
  • The accumulated results and input operands are stored in specified locations in the ALU.
  • For performing integer calculations, ALUs are made. Because the result is also an integer, ALUs commonly do multiplication in addition to addition and subtraction.
  • Some computers have two distinct units called AU and LU, which perform arithmetic computations in AU and logical operations in LU.
  • ALU's structure includes a variety of accumulator registers.
  • All arithmetic and logical operations on the data are carried out by this section of the CPU.
  • It executes all mathematical operations during arithmetic processing (such as addition, subtraction, multiplication, and division).
  • It does relational and logical operations during logical processing (such as comparing larger or smaller values, true or false statements, etc i.e. compares the numerical data as well as alphabetic data).
  • The ALU is capable of performing logical operations on both letter and number binary codes.
  • Numerous registers and adder circuits make up the ALU. A register is a type of temporary storage that keeps information and commands while they are being interpreted and carried out. Data and instructions must be saved in one of this unit's registers before they can be read from main memory and processed.

Reference:

Ghishing, Er.Ashim. Computer Science. Kathmandu, Nepal: Benchmark , 2008.

Things to remember
  • The central processing unit (CPU) is the brain of any computer. It carries out all the processing in the computer.
  • Central Processing Unit itself consists of three main subsystems. The first one is Control Unit, the second is Arithmetic and Logic Unit (ALU), and the third is Memory Unit.
  • A CPU works in a fetch, decode and execute cycle. It follows a sequence of steps while carrying out the necessary instructions for a program.
  • Control unit controls the overall operation of the computer system. It is considered as the heart of the computer system
  • The unit that performs arithmetic and logic operations such as addition, subtraction, shifting operation and logic instructions such as AND, OR, NOR and NOT is known as ALU.
  • ALU can perform logical operations on the binary codes for letter as well as numbers.

© 2021 Saralmind. All Rights Reserved.