logic circuit with 3 inputs - Search