Logic gates are the building blocks for how computer works.There are 3 main gates, which are-(OR, AND and NOT).And this 3 gates give us basic logic gates such as NAND, and NOR gates, which are the universal building blocks of digital circuits.
Logic gates turn ON when a certain condition is true and it turn OFF when the condition is false.
Here,
True=ON=1;False=OFF=0