An arithmetic-logic unit (ALU) is the part of a computer processor (CPU) 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). Some processors contain more than one AU. For example, one for fixed-point operations and another for floating-point operations. Typically, the ALU has direct input and output access to the processor controller, main memory(RAM in a personal computer), and input/output devices. The input consists of an instruction word (sometimes called a machine 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. The format may be combined with the op code and tells. The output consists of a result that is placed in a storage register and settings that indicate whether the operation was performed successfully. In general, the ALU includes storage places for input operands, operands that are being added, the accumulated result (stored in an accumulator), and shifted results. The flow of bits and the operations performed on them in the subunits of the ALU is controlled by gated circuits. The gates in these circuits are controlled by a sequence logic unit that uses a particular algorithm or sequence for each operation code. In the arithmetic unit, multiplication and division are done by a series of adding or subtracting and shifting operations. There are several ways to represent negative numbers. In the logic unit, one of 16 possible logic operations can be performed. The design of the ALU is obviously a critical part of the processor and new approaches to speeding up instruction handling are continually being developed.
Tuesday, July 8, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment