I haven't actually found that many of these, but I know others have made them. Nonetheless, that hasn't stopped me before:
The green button is to get an output once you've punched in the correct combination and the red button is to "reset" and restart punching in the code.
Everything before that line of comparators (everything behind that green line that runs across the machinery) is simply me trying to get the outputs from all of those 9 buttons into a straight line. The purple line is the output, which, right now, just powers a lamp. The red circuit towards the end is the "wrong number" circuit, the black line is for the reset button, and the lime line is for the "submit" button.
The actual brains of the machine are in the very back. Each time you punch in a correct number, an item moves from one of those bottom droppers into the top ones, and when all the top droppers are full it will activate the blue circuit (an AND gate) to allow an output. Every time a button is pressed, the hoppers down there de-power for a split second to allow the item to shift over by one so the next dropper pair can be powered. The reset line moves all items out of the top droppers back down into the bottom dropper and allows the item in the hopper to cycle all the way back. If you punch in a wrong number, it activates the reset line.
This way, if you punch in a wrong number, you will have to start over and the code you entered will be wrong. If you punch in the correct numbers in the wrong order, there will be items missing from some droppers (since only one can get activated at a time).