Design and draw a 1-bit 4-function ALU with the following specifications. The unit should have five input lines: (1) A, a data line, (2) B, another data line, (3) Cin, the carry-in for addition, and (4-5) S0 and S1, a pair of control lines that determine the operation performed by the ALU. There should be two output lines--the result R, and the carry-out Cout. R should depend on the input as follows:
S1 S0 R
============================
0 0 NOT A
0 1 A AND B
1 0 A OR B
1 1 A + B + Cin (where + is addition rather than OR)