The lights depend on the switches using the same rules that logic gates do.
Logic gates are the fundamental building blocks of all digital electronics.
Once the rules for these basic building blocks are discovered, students experiment with simple examples of how to combine logic switches into useful patterns like a burglar alarm or anti-lock brakes. Finally, students design something of their own from logic switches. Express patterns to others. Use simple patterns as building blocks to construct something more complicated. Realize that complex things may be composed of simple building blocks.