3 input nand gate logic site:electronics.stackexchange.com - Search