Design an 8-function ALU that accepts 4-bit inputs a and b, a 3-bit input signal select, and produces a 5-bit output out. The ALU implements the following functions based on 3-bit input signal select.
select signal function
3' b000 out a
3'b001 out a+b
3'b010 out a-b
3'b011 out a/b
3, b 100 out-a%b (remainder)
3'b101 out-a<< 1
3'b110 out (a2b) (magnitude comparison)
3'bl11 out (a>b) (magnitude comparison) You must simulate all these eight functions using a testbench.
For each of these functions, test the design for 9 values in all (a-3, 2, 1 and b = 1, 2.3.)