i have to design a circuit.

the problem is written like this.

You have 4 inputs, 3 of them are switches, up (1)-down (0), and the doorknob. placing the switches in 1-0-1, and turning the doorknob, the door will open. You have 2 outputs, the alarm and the door opens. if the swtiches are not place in teh correct series, and you turn the doorknob, the door will not open and the alarm will go off. if its put in the right way, then the door will open and the alarm will not go off.

ive been trying to do it on my own, but its gotten to a point were i dont know what im doing. Right now we're studying gates, AND, OR, NOT, NAND, and well im was trying to figure out a way but couldnt.

if anyone could help me figure this out, it would be great help. ill post again, writting down the problem, as is written in my paper.

thank you very much, Sakeru.