NOR gates and NAND gates have the unique property of being able to generate any logical Boolean expression if properly designed, which is why they are called universal gates.
The NOR gate is a universal logic gate that combines the NOT and OR gates in such a way that the output of the OR gate is connected to the input of the NOT gate.
The NAND universal logic gate is a combination of the NOT and AND gates, with the output of the NAND gate connected to the input of the NOT gate.