The ALU (logical arithmetic unit) It is an electronic circuit whose function is to carry out all the processes related to the procedures of logic and numerical calculation. It is listed as an indispensable component of the central processing unit (CPU) of computers.
Recent CPUs include very powerful and complex ALUs. In some CPU structures, the ALU is divided into an arithmetic unit and a logical unit. In addition to the ALU, current CPUs include a control unit.
Most of the operations of a CPU are performed by one or more ALUs, when data is loaded from the input registers. A register is a small free space to store as part of a CPU.
The control unit tells the ALU what procedure to run with that information, and saves the result to an output register. The control unit carries out the transfer of information between registers, ALU and memory.
As procedures become more complex, the ALU is also going to take up more CPU space, cost more, and generate more heat..
Article index
The ALU is primarily dedicated to performing logical and mathematical operations, including bit-shifting operations. These are fundamental processes that must be executed on almost all the data that the CPU processes.
The logical arithmetic unit is that component of the CPU that performs all the calculations that the CPU may need. It is the "calculating" part of the computer, as it performs basic arithmetic and logical operations..
Much of the procedures are of a logical nature. According to the design of the ALU, the CPU can be given more power. However, it will also make you use more energy and produce more heat..
The different operations carried out by the ALU can be classified as follows:
Here are the different logical operations, such as AND, OR, NOT, XOR, NOR, NAND, etc..
Refers to the addition and subtraction of bits. Although multiplication and division are sometimes used, these operations are more expensive to perform.
You can also use repetitive addition to replace multiplication and repetitive subtraction to replace division.
Refers to shifting bit positions in a certain number of places to the right or left, which is considered a multiplication operation.
In the arithmetic unit, multiplication and division are performed by a series of addition or subtraction operations and by shifting the bits. There are several ways to represent negative numbers.
Any of 16 possible logical operations can be performed on the logical drive. For example, contrast two operands or recognize where the bits do not match.
The ALU can directly access both input and output to the processor control unit, main memory and input and output devices.
The input and output data are transmitted through an electronic path called a bus. The input corresponds to an instruction, which includes one or more operands, an operation code and, in some cases, a format code.
The operation code shows the ALU what action it should execute, in addition to the operands involved in that operation. For example, you could indicate that the two operands be subtracted or compared.
The output consists of a result that will be placed in a storage register and a configuration that will indicate whether the operation was successful. If not, some kind of state will be stored in the machine state.
The bit stream and the operations performed on them in the ALU subunits are controlled by gate circuits.
In these circuits, a logical sequence unit is the one that directs the gates, through a specific sequence that corresponds to each operation code.
All information in a computer is stored and handled in the form of binary numbers, that is, 0 and 1. Transistor switches are used to handle binary numbers, since there are only two possible states in a switch: open or closed.
An open transistor, through which no current passes, represents a 0. A closed transistor, through which current passes, represents a 1.
Operations can be accomplished by connecting multiple transistors. One transistor can be used to drive a second transistor. For example, the switch of one transistor turns on or off depending on the state of a second transistor..
This is known as a gate, because this arrangement can be used to allow or stop electrical current.
The gates are the building blocks of the ALU. They are built from diodes, resistors, or transistors. These gates are used in the integrated circuit to represent a binary input as "on" and "off" state..
The ALU is configured through a combinatorial circuit. This circuit uses logic gates such as AND, OR, NOT for its conformation.
The AND gate has two or more inputs. The output of the AND gate is 1 if all the inputs are 1. The AND gate returns 0 if any of the input data is 0.
The OR gate can have two or more inputs. The output of the OR gate will always be 1 if any of the inputs are 1 and 0 if all the inputs are 0.
The simplest type of operation is a NOT gate. It uses only a single transistor. Uses a single input and produces a single output, which is always the opposite of the input.
The NOT gate is used to reverse the result of the gates or invert the Boolean state from 0 to 1 and from 1 to 0. It is also used with the “AND” and “OR” gate..
When used in conjunction with the AND or “OR” gate, the NOT gate is represented by a small circle in front of both gates..
After using the NOT gate, the AND gates become NAND and the “OR” gates become NOR.
They are a very important component in the ALU to store instructions, intermediate data, the input operands, the operands that are added, the accumulated result, which is stored in an accumulator, and the final result..
Registers provide very fast access to memory, compared to cache, RAM, and hard disk. They are built in CPU and are small.
Yet No Comments