truth table for 3 input - Search