Binary circuit

Switch S1
S L
0 0
1 1

AND gate

Switch S2
Switch S3
S1 S2 L
0 0 0
0 1 0
1 0 0
1 1 1

OR gate

Switch S4
Switch S5
S1 S2 L
0 0 0
0 1 1
1 0 1
1 1 1