gate and truth diagram - Search