I am trying to figure out how to create a combination lock using logic gates, so that a password must be input (let's say pressing numbered buttons) in the correct order.
I understand logic gates completely, and have some of a grasp on flip-flops and latches, but I'm definitely getting stuck on how to use them in the right combination.
So as an example, if there are 3 buttons (call them 1, 2, & 3), I would like to be able to set a password such as 1 2 3 1 (hardcoded is fine), where they have to be input in that exact order, otherwise you have to start at the beginning again (1 2 3 3 3 3 1 will not work).
Any tips, links, hints on this?