Question

Design a datapath which inputs three 3-bit unsigned numbers x,y, and z. If z is the binary representation for 3 or 7, output x + y. If z is the binary representation of 4 or 6, output x + z. If z is anything else, output y + z. You may use comparators, adders, decoders, and multiplexers in our design.