Logic Gates · Electrical engineering

Combination lock

Combination lock is an interactive experiment in Logic Gates, a free simulation from StudyFi Lab that runs right in your browser.

The LED lights for just one combination of the four switches. Inside, each switch goes into an AND gate either directly (the code wants a 1) or through a NOT (the code wants a 0); the AND gates give 1 only when all their inputs are 1. This is how a digital circuit recognises one exact pattern of bits.

Try this: Find the code by trial and error, then open the circuit: the NOT gates tell you which switches must be 0.

Frequently asked questions

What does the “Combination lock” experiment show?

The LED lights for just one combination of the four switches. Inside, each switch goes into an AND gate either directly (the code wants a 1) or through a NOT (the code wants a 0); the AND gates give 1 only when all their inputs are 1. This is how a digital circuit recognises one exact pattern of bits.

How do I try “Combination lock”?

Find the code by trial and error, then open the circuit: the NOT gates tell you which switches must be 0.

Studying for a test?

Upload your notes and StudyFi turns them into flashcards, tests and podcasts.

Try StudyFi free