--A1L4 is D~1
A1L4_p2_out = X & !Y;
A1L4_p3_out = !X & Y;
A1L4_or_out = A1L4_p2_out # A1L4_p3_out;
A1L4 = BIN $ A1L4_or_out;


--A1L7 is add~48
A1L7_p1_out = !X & Y;
A1L7_p2_out = !X & BIN;
A1L7_p3_out = Y & BIN;
A1L7_or_out = A1L7_p1_out # A1L7_p2_out # A1L7_p3_out;
A1L7 = A1L7_or_out;


--X is X
--operation mode is input

X = INPUT();


--Y is Y
--operation mode is input

Y = INPUT();


--BIN is BIN
--operation mode is input

BIN = INPUT();


--D is D
--operation mode is output

D = OUTPUT(A1L4);


--BOUT is BOUT
--operation mode is output

BOUT = OUTPUT(A1L7);


