Also, 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 A
0 1 A + B + Cin
1 0 A OR B
1 1 NOT A
Cout should be the carry-out if the operation is addition (that is,
S1 = 0 and S0 = 1), and 0 otherwise. Note that R is a single bit,
so the result R of the addition operation is the right-most bit
of the sum of A, B, and Cin.