Arithmetic logic unit (ALU)
Example: Specification for a simple ALU
FunctionFi = AiFi = not AiFi = Ai xor BiFi = Ai xnor Bi
CommentInput Ai transferred to outputComplement of Ai transferred to outputCompute XOR of Ai, BiCompute XNOR of Ai, Bi
M = 0, Logical Bitwise Operations
M = 1, C0 = 0, Arithmetic Operations
F = AF = not AF = A plus BF = (not A) plus B
Input A passed to outputComplement of A passed to outputSum of A and BSum of B and complement of A
M = 1, C0 = 1, Arithmetic Operations
F = A plus 1F = (not A) plus 1F = A plus B plus 1F = (not A) plus B plus 1
Increment ATwos complement of AIncrement sum of A and BB minus A