This is probably the most basic lock in the game. It's easy to build (and understand) and it does not take too much space, so it's ideal for locking your home even in challenging mode. Unfortunately, it's very easy to unlock, even if you dont know password (for better locking your secret rooms, try this ).
As you can see, code is 1-0-1-1-0 . Door will get open only if the entered code is exactly the same. If you will (for example) enter 1-1-1-1-0, door won't open.
NOTE: On the picture it's big, because I wanted to make it understandable, so I put all the parts on one big wall. Normaly it should be build in cube, with less spaces between the wires and logical gates.
If you still don't know how to do it, or you just want to see it from more directions, you can download the map. The map includes also advanced button lock, counter (it's used in the advanced button lock) and binary counter. You can find it here .