Logic Gates
AND Gate &
→
0
| A | B | Out |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Output is 1 only when both inputs are 1
OR Gate |
→
0
| A | B | Out |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
Output is 1 when either input is 1
NOT Gate !
→
1
| A | Out |
|---|---|
| 0 | 1 |
| 1 | 0 |
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.