Handles AND, OR, and binary addition. Handles binary subtraction by
b and doing addition. (Flip all the bits and set
CarryIn0 to 1 to compute two's complement.) Can also negate
a to implement NOR operation. To determine whether
a < b, calculate (a - b) and determine whether
result is negative (bit 31 is 1).
Overflow detection uses carry31 (overflow if unsigned), or
uses comparison of bit 31 of
sign?) and comparison of that against bit 31 of the sum (different
Stop and Think: How does the ALU execute the NOR operation? What control lines would be turned on?