Back to Bug Lab

Logic Gates

AND Gate &

0
ABOut
000
010
100
111

Output is 1 only when both inputs are 1

OR Gate |

0
ABOut
000
011
101
111

Output is 1 when either input is 1

NOT Gate !

1
AOut
01
10

Output is the opposite of the input

Challenge

Make the light turn green! The rule is: A AND (NOT B).
Turn on A and turn off B.

NOT B →AND →
0

What you just learned: Every computer is made of billions of tiny logic gates — switches that decide yes or no based on simple rules. AND, OR, and NOT are the building blocks of everything a computer does.