A circuit having 2 inputs and 2 outputs
This seems to work: 



"U1" on the '153 should read "U2", but Imgur was unhappy with my edited .png, so "U1" it stays.

The LTspice files are here, and if you want to play with the circuit just download them all into the same folder and run the .asc file with LTspice.