What is Arithmetic Logic Unit (ALU)?

5722
ALU.


A computer is an electronic machine which can make our work easy. There are different parts in the computer which are used to perform different operations one of which is Arithmetic Logic Unit (ALU). The name itself specifies that it performs arithmetic and logic operations.

This digital circuit is one of the main components of the CPU. It can process both mathematical operations on numbers and bitwise calculation. Once the processing is done by ALU the result is sent to the memory of the computer.

There are many modern CPU where complex ALU circuit is used. While in other ALU is divided in AU and LU to perform arithmetic and logical operations respectively.

Also read – Artificial Intelligence – A brief overview

The Cycle of ALU and Data

Fetch instruction to memory from memory unit -> Control unit decodes the instruction to commands -> ALU executes the command -> lastly result is again stored in Memory unit.

Functions of Arithmetic Logic Unit

  • ALU is the main block in CPU which can perform all logical and arithmetic operation.
  • Arithmetic functions performed by ALU are addition, subtraction, multiplication and division.
  • The logical operation performed by ALU is a comparison between numbers, letters and special characters.
  • It also performs other operations such as equal-to-condition, less than and greater than the condition.

Architecture of ALU

The ALU design will show how it works with the processor. Logic gates are a very important part of ALU. Also, ALU is divided into different sets as explained below:

OR gate:

It requires two or more than two inputs where if all inputs are false the output is 0 and if any of the input is 1 the output is also 1.

AND gate:

If all inputs in AND gate is 1 the output is also 1 and if any of the input is 0 the output of AND gate is also 0.

NOT gate:

It is having the capability to reverse the result of AND, OR gate. SO, after using it the NAD become NAND while OR becomes XOR.

Accumulator:

It is one kind of special register which stores the result of input performed by ALU. It also works as an operand for every instruction that comes to ALU for processing.

Registers:

It is quite small in size and registers can access fast as compared to any other storage. The operation performed by ALU will decide the number of registers. Arithmetic Logic Unit generally uses 4 registers where each can store 16 bit of data.

Program Counter:

It is one type of register which comes with 16-bit storage and is working as a counter which shows ALU regarding instruction left to execute. ALU will know about the next instruction to be executed with help of address stored in PC.

Instruction Register:

It has the instructions to be executed and has two different register Opcode and operand.

Input /output register:

Input register has input that came from the input device while the output register has an output which is sent to the output device.

Memory Address Register:

It has an address of memory from where data is to be fetched and again sends back after calculation.

Data Register:

It has the instruction fetched from memory for processing.

Importance of ALU in Processing Unit

Calculations which that comes to CPU are handled by ALU. CPU can become powerful depending on the circuitry arrangement of ALU. CPU performs logical operation through ALU and this makes CPU to consume more energy.

The Bottom Line

So, now you know how important it is to design ALU effectively which can balance the power and cost of the processing unit. There are people who are in need of fast processing unit and it requires to have powerful ALU, no matter how much power it consumes. Do you think it possible to build a modern computer without ALU?

Leave a Reply !!

This site uses Akismet to reduce spam. Learn how your comment data is processed.