Lets say you want an AND/OR gate, requiring either Both to be engaged, or just one. You wire the AND through a mutual switch, which leads to the target, lets say a Door, if done correctly, this creates a functioning AND/OR gate.
But what if you want a multy coded lock? Well, you take the password (Lets say 29574) and you tie keys 2, 4, 5, 7, and 9 to an AND gate, and the rest to nothing. Bam. Works. Magic.
I know a bit, and the basic lodgic gates such as AND/OR gates, along with D Flip-Flops, but that's the best I could give you. Here are a few links to tutorials on Redstone though, so this post can be useful.