Arithmetic logic unit (ALU) - what is it?

As you know, a computer processor consists of four basic components: an arithmetic logic device, an input / output module, as well as memory and control units. Such an architecture was defined in the last century and, despite the fact that a lot of time has passed, the classical structure of von Neumann remains relevant.

What is ALU?

Arithmetic-logical device is one of the components of the processor, which is necessary for the implementation of transformations of the logical and arithmetic type, starting with elementary and ending with complex expressions. The length of the operands used is considered to be the word length, or size.

arithmetic logic device

The main task of ALU is to process data stored in the computer's RAM. In addition, the arithmetic-logic device is capable of producing control signals that direct the computer to choose the right path to perform the necessary computing process, depending on the resulting data types. All operations involve electronic circuits, each of which is structurally divided into thousands of elements. Such boards are usually fast-acting and have a high density.

Depending on the signals that are input, ALU perform different types of operations with two numbers. Any arithmetic-logical device of a computer provides for the implementation of four basic actions, shifts, as well as logical transformations. The set of ALU operations is its main characteristic.

control devices

The components of the arithmetic-logical device are the four main groups of nodes that correspond to the processes of control, transmission, storage and conversion of incoming data.

ALU storage nodes

This category includes:

  • triggers storing auxiliary bits and various signs of results;
  • registers responsible for the integrity of operands, subtotals and final totals.

Sometimes the registers of the arithmetic-logical device can be combined into a specialized memory unit, and triggers can form a single state register.

ALU transmission nodes

This category includes:

  • tires connecting the device blocks;
  • multiplexers and valves, responsible for choosing the right direction of operations.

ALU conversion nodes

These include:

  • adders performing microoperations;
  • schemes for performing logical actions;
  • shifters;
  • proofreaders for decimal arithmetic;
  • code converters used to obtain inverse or additional data;
  • counters for counting the number of completed cycles and for implementing auxiliary transformations.

ALU control nodes

This category of objects includes:

  • control unit;
  • signal decoder;
  • logical feature conversion schemes needed to form branches for microprograms.

Processor Control Device Action

This block is responsible for generating a sequence of functional signals necessary for the correct execution of a given command. As a rule, such transformations are implemented in a few clock cycles.

The control device provides automatic program execution. This involves the necessary coordinated branches of the other components of the machine.

For the operation of the control device meets the basic principle of microprogramming, which has a clear number of characteristics.

ALU classification

Arithmetic-logic devices by the method of operating variables are divided into parallel and serial. The main difference between these ALUs is the way they represent operands and perform operations.

By the nature of their use, arithmetic-logical devices are divided into multifunctional and block ones. In the ALU of the first type, the same schemes are used to perform operations with various forms of representation of numbers, which adapt to the requested mode of working with data. In block devices, all operations are performed through the distribution of data types. For operations with decimal numbers, numeric and alphanumeric fields, floating-point or fixed-point numbers, various schemes are used. At the same time, the arithmetic-logical device works much faster due to the parallel execution of tasks. But they also have a drawback - increased costs for equipment support.

The arithmetic logic device according to the presentation method can be used for:

  • decimal numbers;
  • floating point numbers;
  • fixed point numbers.

Device operations

The structure of ALU involves performing actions through logical functions that are divided into such groups:

  • decimal arithmetic;
  • binary arithmetic for numbers with a clearly defined dot;
  • hexadecimal arithmetic for floating-point expressions;
  • Modification of team addresses
  • logical type operations;
  • conversion of alphanumeric fields;
  • special arithmetic.

arithmetic operations

Modern electronic computers are able to implement all of the above types of activity, and microcomputers do not have such basic functionality, so the most complex procedures are performed by connecting small subprograms.

Arithmetic operations and logical procedures

All actions of ALU can be divided into several groups.

Arithmetic operations include division, multiplication, subtraction of modules, ordinary subtraction and addition.

components of an arithmetic logic device

The group of logical transformations includes the logical β€œand” and β€œor”, that is, conjunction and disjunction, as well as comparison of data for equality. Such procedures, as a rule, are performed on binary words consisting of many digits.

computer arithmetic logic device

Special arithmetic operations include normalization, logical and arithmetic shifts. There is a significant difference between these transformations. If during the arithmetic shift in the location only digital digits are changed, then with a logical sign the digit is connected to the movement.

Each operation that occurs through the use of an arithmetic logic device can be called a sequence of functions of a logical type, which are described by multi-bit logic for electronic computers. For example, for binary computers, binary logic is used, and so on, right down to the decimal system.

Absolutely all arithmetic-logical transformations have their own operands, and the output results are interpreted as bit strings with sixteen bits. The only exceptions are the primitives of the sign division of DIVS. A variety of flags allow you to interpret the output data as numbers with a minus or plus sign when overflowing. The logic for converting bits is based on modulo arithmetic. The flag is set if unpredictable changes with a sign have occurred. For example, adding up two positive numbers, you should get a result with a β€œ+” sign. But if there is a transfer to the sign bit, setting one, and the result is negative, then the overflow flag is set.

alu structure

The logic of the carry bit is based on unsigned arithmetic. This flag is set by the system if the generated transfer from the high order cannot be written as a result. This ALU bit is very efficient when using transformations with verbose representations.

Conclusion

The arithmetic-logical device is used to perform logical and arithmetic transformations on the necessary operands, which often play the role of commands or codes of numbers. After performing the action, the result is again fed to the storage device for use in the following calculations.


All Articles