A programmable code lock can be used for numerous applications in which access to an article/gadget is to be restricted to a limited number of persons. Here is yet another circuit of a code lock employing mainly the CMOS ICs and thumbwheel switches (TWS) besides a few other components. It is rugged and capable of operation on voltages ranging between 6 and 15 volts. The supply current drain of CMOS ICs being quite low, the circuit may be operated even on battery. The circuit uses two types of thumbwheel switches. switch numbers TWS1 through TWS8 are decimal-to-BCD converter type while switch numbers TWS9 through TWS16 are 10-input multiplexer type in which only one of the ten inputs may be connected to the output (pole). ..
Read more source: http://electronic-circuits-diagrams.com/homegarden/circuit-diagrams/homegardenckt2.shtml