site:geeksforgeeks.org Application of Logic Gates - Search