In a nutshell
Logic gates are the smallest building blocks of a computer: tiny circuits that take one or two bits in and give one bit out, following simple rules like AND, OR, and NOT. Each gate's behaviour is captured by a truth table that lists the output for every possible input. Remarkably, the NAND and NOR gates are 'universal' — any circuit at all, right up to a whole processor, can be built from copies of just one of them.