So, the components that are used here : 12 buttons , 7 resistances , 3 light-emitting diodes (LED) , 1 inverter , 1 logic gate AND , one logic gate OR, one switch to simulate the lock and of course the most important component is the PIC16F917 micro-controller.
I will show you a simulation of how this digital lock works :
I compiled this in mikroC PRO for PIC, and the simulation is made in Proteus 7. If you have any other questions please fell free to write a comment or you can contact me, I will try yo answer as quick as I can.
You can download the code and the simulation from here :