Definition
- A digital circuit that performs arithmetic and logical operations.- Arithmetic instructions include addition, subtraction, and shifting operations.
- Logic instructions include boolean comparisons, such as AND, OR, XOR, and NOT operations.
- A fundamental building block of the central processing unit (CPU) of a computer and even the
simplest microprocessors.
- A single component may contain a number of ALUs.
- For purposes such as maintaining timers.
Arithmetic Logic Unit schematic symbol
Numerical systems
- ALUs perform integer calculations.- An ALU must process numbers using the same format as the rest of the digital circuit.
- The format of modern processors is almost always the two's complement binary number representation.
- In ones' complement and two's complement number systems, subtraction can be accomplished by
adding the negative of a number which negates the need for specialized circuits to do subtraction.
- Ways for calculating the negative in two's complement :
ⅰ. add 1 to the low order bit and propagate the carry.
ⅱ. present 1 to the carry input of the adder and use ¬B rather than B as the second input.
- ALUs typically do not perform division operations, since the result may be a fraction, or a "floating point"
number.
- Instead, division operations are usually handled by the floating-point unit (FPU), which also performs
other non-integer calculations.
- In order to do these calculations, a FPU has several complex circuits built-in, including some internal
ALUs.
Practical overview
- Most of processor's operations are performed by one or more ALUs.- An ALU loads data from input registers, an external Control Unit then tells the ALU what operation to
perform on that data, and then the ALU stores its result into an output register.
- The Control Unit is responsible for moving the processed data between these registers, ALU and memory.
Complex operations
- An ALU can be designed to calculate any operation.- The more complex the operation, the more expensive the ALU.
- The more space used in the processor, it dissipates more power.
Inputs and Outputs
- The operands (inputs to the ALU) 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 the inputs or outputs with 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, etc.
KANG YI SHIN
B031210356
No comments:
Post a Comment