# MUX2 # input: x3, x2, x1, x0, s2, s1 # output: y GATE("x0", type="inp") GATE("x1", type="inp") GATE("x2", type="inp") GATE("x3", type="inp") GATE("s1", type="inp") GATE("s2", type="inp") GATE("y", type="out") GATE("g1", type="not") GATE("g2", type="not") GATE("g3", type="and3") GATE("g4", type="and3") GATE("g5", type="and3") GATE("g6", type="and3") GATE("g7", type="or4") WIRE("s1", "g1/x") WIRE("s1", "g5/x1") WIRE("s1", "g6/x1") WIRE("s2", "g2/x") WIRE("s2", "g4/x3") WIRE("s2", "g6/x3") WIRE("x0", "g3/x2") WIRE("x1", "g4/x2") WIRE("x2", "g5/x2") WIRE("x3", "g6/x2") WIRE("g1/y", "g3/x1") WIRE("g1/y", "g4/x1") WIRE("g2/y", "g3/x3") WIRE("g2/y", "g5/x3") WIRE("g3/y", "g7/x1") WIRE("g4/y", "g7/x2") WIRE("g5/y", "g7/x3") WIRE("g6/y", "g7/x4") WIRE("g7/y", "y")