A better approach to implementing logical operations in circuits is the use of logic gates, which can be built with simple relays. This chapter demonstrates how these logic gates perform logical operations.
Toggle the state of the switches with mouse clicks or finger taps.
The kitten selector can be built from logic gates rather than switches.
Here are two more logic gates that are the inverses of those shown earlier.
In this summary of the four basic logic gates, the switches are now shown as simple boxes at the upper-left. They display 0 if the switch is off and 1 if it's on. You can toggle these switches with either mouse clicks or finger taps. Instead of a lightbulb, the output is shown with a circle labeled 0 or 1.
English mathematician Augustus de Morgan established in the 19th century that the various logical operations are intimately related, as this illustration demonstrates.