Arithmetic logic unit

This article is about computer arithmetic units. An alternative meaning of ALU is Alu sequence (note lowercase).

The arithmetic logic unit/arithmetic-logic unit (ALU) of a computer's CPU is a part of the execution unit, a core component of all CPUs. ALUs are capable of calculating the results of a wide variety of basic arithmetical computations.

Virtually all modern computer ALUs use the two's complement binary number representation (whereas some early computers used either one's complement or sign-magnitude format).

ALU operations

Most ALUs will perform the following operations:

A standard ALU typically does not handle integer division or any floating point operations. Optional methods for these types of calculations include:

Inputs and outputs

The ALU takes as input the data to be operated on (called operands) and a code from the control unit indicating which operation to perform. The output is the result of the computation.

In many designs the ALU also takes/generates as inputs/outputs a set of condition codes from/to a status register; typically these codes are used to indicate cases such as carry-in or carry-out, overflow, divide-by-zero, etc.

See also

de:Arithmetic Logical Unit es:Unidad aritmético-lógica fr:Unité arithmétique et logique gl:ALU it:Arithmetic Logic Unit hu:Aritmetikai logikai egység nl:ALU ja:演算論理装置 pl:Jednostka arytmetyczno-logiczna