| Remarks
| Inputs are two operands plus and two control lines,
one (Op) to choose a function and the other (IsL)
to indicate arithmetic (signed) or logical (unsigned) operation.
(When the IsL input is 0 operations are arithmetic, and when 1 they
are logical.)
The component output is I0 <op> I1.
The mapping from control values to ALU operations is settable
by the user; there may be 4, 8, 16, or 32 distinct codes.
The default mapping is:
| 000 |
Add |
| 001 |
Subtract |
| 010 |
Multiply |
| 011 |
Divide |
| 100 |
And |
| 101 |
Or |
| 110 |
Xor |
| 111 |
Set less-than
(I0 < I1) |
Besides these operations, the other available ALU operations
are NOR, shift-left, and shift-right.
Output Z is a single bit, set to 1 if the ALU output is zero.
Output C is a single bit equal to the carry out.
Output Ex is an exception, asserted if overflow occurs.
|