The ALU is one of the most critical components in a microprocessor, and it is typically the first part of the processor to be designed. Following the design of the ALU, the remainder of the microprocessor is implemented to feed operands and control codes to the ALU.
We aim to design an ALU that does eight operations shown below in the table. Follow the same order.
Logical Operation:
- NAND: (A B)'
- NOR: (A + B)'
- XOR: A ⊕ B
- Equality: A == B
Arithmetic Operations:
- Add Cin to (A and B): Cin + AB
- Add A, B and Cin: A + B + Cin
- Subtract B from A: A - B
- Increment A: A ++