Given the ALU pseudo code below, write the Verilog code and draw its logical block diagram using only 1 full adder, bitwise OR/AND, and as fewer MUXes as possible.

Verilog implementation should be straightforward:

The logical block diagram below shows one possible physical implementation. Note, the solution below uses 5 MUXes in total.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.