There are 2 articles on this title. You are reading the article ranked and rated #2 by Helium's members.
An arithmetic-logic unit (ALU) is the part of a computer processor that carries out arithmetic and logic operations on the operands in computer instruction words. In some processors, the ALU is divided into two units, an arithmetic unit (AU) and a logic unit (LU). Arithmetic and Logic Unit". The part of the central processing unit (CPU) which performs operations such as addition, subtraction and multiplication of integers and bit-wise AND, OR, NOT, XOR and other Boolean operations. ALU is a generic term for a functional unit in a computer. ALU performs various operations on data (operands) and produce an output. A simple ALU has two inputs and one output. Examples of ALU operations are ADD, SUBTRACT, SHIFT, NEGATE, AND, and OR. ALU also produces the outputs that become the 'condition codes' for a computer.
Floating-point operations are handled by a separate floating-point unit. A floating point arithmetic logic unit includes two rounding units that select between an incremented, un-incremented, and complemented result from a carry propagate adder. A fast rounding unit selects a result as an approximation based on the equality or inequality of the exponents of the operands, the relative sizes of the mantissas and the presence of a guard bit. The result selected by the fast rounding unit is received by a leading zero count unit, which counts the leading zeros of the result. A second slower rounding unit meanwhile makes a selection between the incremented, un-incremented, and complemented results based on the rounding mode, the sign of the result and whether the result is exact.
Typically, the ALU has direct input and output access to the processor controller, main memory (random access memory or RAM in a personal computer), and input/output devices.
The input consists of an instruction word that contains an operation code, one or more operands, and sometimes a format code. The operation code tells the ALU what operation to perform and the operands are used in the operation. (For example, two operands might be added together or compared logically.)
Logical statements might be a little less familiar, but simple questions posed by the program such as "IF A = B GOTO 2300" ask the ALU to decide if the values A and B are the same and return the answer in the form true or false to the processor. If the response in this example were true, the program would jump to line 2300. If false, the program would ignore the "GOTO" command and execute the next line of code. It must be made clear that the arithmetic logic unit is merely a functionary component of the CPU; that is, it merely accepts questions and gives answers, making no decision on what to do next.
Learn more about this author, Amit Pal.
Click here to send author comments or questions.
Below are the top articles rated and ranked by Helium members on:
Add your voice
Know something about What is an arithmatic logic unit?
We want to hear your view.
Write now!
Cast your vote!
Click for your side. Must be logged in.
Featured Partner
The Life in the Bible Institute has partnered with Helium, giving you the chance to write for a cause. Browse it...more
hide