Computers are built with Logic Gates. A logic gate looks at a input that is either on or off, and makes a decision, producing a output that is either on or off. Different types of logic gates have different outputs. The following video describes the various types, and the associated “truth tables”.
Become the Maker you were born to be. Try Arduino Academy for FREE!
Here’s another great tutorial on logic gates.