Arithmetic Logic Unit (ALU)

The ALU used for my CPU works on two 8-bit wide input values, and provides an 8-bit wide output value. The ALU provides in sum 16 different operations, which can be integer (signed and unsigned) operations and logical operations. The ALU is driven by the ALU opcode which includes the 4-bit long ALU function code, which tells the ALU which operation to execute.

Each ALU module was designed and implemented on its own, and finally all 16 modules are connected together to each other to provide the final functionality of the ALU. The downloads at the very end of this page provides you a schematic overview how the individual ALU modules are connected to each other and how the ALU is driven by the Instruction Decoder.

Logical Operations

The ALU provides all the common Logical Operations found in every CPU: