Arithmetic logic unit
Encyclopedia : A : AR : ARI : Arithmetic logic unit
- This article is about computer arithmetic units. An alternative meaning of ALU is Alu sequence (note lowercase).
Von Neumann's proposal
Mathematician John von Neumann proposed the ALU concept in 1945, when he wrote a report on the foundations for a new computer called the EDVAC (Electronic Discrete Variable Automatic Computer). Later in 1946, he worked with his colleagues in designing a computer for the Princeton Institute of Advanced Studies (IAS). The IAS computer became the prototype for many later computers. In the proposal, von Neumann outlined what he believed would be needed in his machine, including an ALU.Von Neumann stated that an ALU is a necessity for a computer because it is guaranteed that a computer will have to compute basic mathematical operations, including addition, subtraction, multiplication, and division Stallings page 19. He therefore believed it was "reasonable that [the computer] should contain specialized organs for these operations" Stallings page 19.
Practical overview
Most of the computer’s actions are performed by the ALU. The ALU gets data from processor registers. This data is processed and the results of this operation are stored into ALU output registers. Other mechanisms move data between these registers and memory. Stallings page 290-291.A Control Unit controls the ALU, by setting circuits that tell the ALU what operations to perform.
ALU operations
Most ALUs can perform the following operations:
- Integer arithmetic operations (addition, subtraction, and sometimes multiplication, though this is more expensive)
- Bitwise logic operations (and, not, or, xor)
- Bit-shifting operations (shifting or rotating a word by a specified number of bits to the left or right, with or without sign extension)
- Software emulation, commonly implemented in hand-written assembly code and placed in a library for use by other programs (The slowest, but least expensive option. If these maths operations are rare, this is often the best overall choice.)
- Microcode programs using the ALU to emulate the missing operations (This is a middle choice, costing more, but also gaining more speed. Some flexibility is lost.)
- Separate hardware components, such as dividers and floating point units (FPUs), sometimes in the form of arithmetic coprocessors (This is the fastest, most expensive and least flexible choice. It risks economic inefficiency, by mismatching the speed of the ALU to the speed of the rest of the computer.)
Inputs and outputs
The inputs to the ALU are the data to be operated on (called operands) and a code from the control unit indicating which operation to perform. Its output is the result of the computation.In many designs the ALU also takes or generates as inputs or outputs a set of condition codes from or to a status register. These codes are used to indicate cases such as carry-in or carry-out, overflow, divide-by-zero, etcStallings page 290-291.
See also
- 7400 series (chip # 74181)
- adder (electronics)
- multiplication ALU
- digital circuit
- division (electronics)
Notes
References
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
