PyGCSE Python Lab
← Back to Dashboard

Logic Gates Practice

Learn how logic gates work and build your own digital circuits

🔌 Circuit Diagram

A
B
AND
Q

📊 Truth Table

ABQ
00
01
10
11

Enter 0 or 1 in each output cell

How to read: Each row shows what the output (Q) will be for different input combinations.

💡 Logic Gate Tips:

  • AND: All inputs must be 1 for output to be 1
  • OR: At least one input must be 1 for output to be 1
  • NOT: Reverses the input (0→1, 1→0)
  • NAND: AND gate followed by NOT (opposite of AND)
  • NOR: OR gate followed by NOT (opposite of OR)
  • XOR: Output is 1 only when inputs are different