EveryCircuit
Contact
Reviews
Home
kaivanveldhoven
modified 11 years ago

Combination Lock

19
3
542
09:00:51
This circuit illustrates the use of XOR (Exclusive-OR) gates as bit comparators. Four of these XOR gates compare the respective bits of two 4-bit binary numbers, each number "entered" into the circuit via a set of switches. The top 4 switches represent the 'key' switches as the bottom 4 represent the code combination programming switches. Set your code with the bottom ones and enter it with the top 4. To check your input press the NC button in the middle. ______________________________________ Workings: It is the nature of an XOR gate to output a "high" (1) signal if the input signals are not the same logic state. The four XOR gates' output terminals are connected through a diode network which functions as a four-input OR gate: if any of the four XOR gates outputs a "high" signal -- indicating that the entered code and the key code are not identical -- then a "high" signal will be passed on to the NOR gate logic. If the two 4-bit codes are identical, then none of the XOR gate outputs will be "high," and the pull-down resistor connected to the common sides of the diodes will provide a "low" signal state to the NOR logic. The NOR gate logic performs a simple task: prevent either of the LEDs from turning on if the "Enter" pushbutton is not pressed. Only when this pushbutton is pressed can either of the LEDs energize. If the Enter switch is pressed and the XOR outputs are all "low," the "Go" LED will light up, indicating that the correct code has been entered. If the Enter switch is pressed and any of the XOR outputs are "high," the "No go" LED will light up, indicating that an incorrect code has been entered. Though, since this is a 4-bit lock, this isn't a very sophisticated system because 4 bits only provide 16 combinations which can very easily be ran trough to find the right combination.
published 11 years ago
Raphango
11 years ago
Awesome! Great idea for changing the code! Congratulations! :D
reinhold
11 years ago
Fine shit...10101010 or 00000000 light up green...funny LOLLY LOLL LOLL FLATGERMANY
reinhold
11 years ago
It's but a comparator of any 4 digit code NOT a code lock at all. Lolly lol lol

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy