Logic Gates and Boolean Algebra Worksheet Generator

Truth tables, circuits drawn by code, and Boolean algebra. No AI, no credits.

Grades 6 – 12No account needed

Truth tables for expressions, circuits drawn by code (AND, OR, NOT, NAND, NOR, XOR), reading a circuit to write its expression, writing a circuit from an expression, and Boolean algebra simplification. Every truth table is computed by code. No AI, so it never uses a generation credit.

What students practice

  • Computer Science
  • Logic gates
  • Boolean algebra

Live sample sheet

No account needed to view and print.
Name: ____________________Date: ____________

Logic Gates and Boolean Algebra

1. Complete the truth table for: A AND B
A AND BABOutput000010100111
2. Write the Boolean expression for a NOR gate with 2 inputs. Then complete its truth table.
A NOR BABOutput000010100110
3. Complete the truth table for: NOT (A OR B)
NOT (A OR B)ABOutput001010100110
4. Write the Boolean expression for a NAND gate with 2 inputs. Then complete its truth table.
A NAND BABOutput000010100110
5. Complete the truth table for: NOT (A AND B)
NOT (A AND B)ABOutput001011101110
6. Write the Boolean expression for a XOR gate with 2 inputs. Then complete its truth table.
A XOR BABOutput000010100110
7. Complete the truth table for: NOT (A AND B)
NOT (A AND B)ABOutput001011101110
8. Write the Boolean expression for a NAND gate with 2 inputs. Then complete its truth table.
A NAND BABOutput000010100110
9. Complete the truth table for: NOT (A OR B)
NOT (A OR B)ABOutput001010100110
10. Write the Boolean expression for a NOT gate with 1 input. Then complete its truth table.
NOT AAOutput0110
Made with TeachSpark

Answer Key — Logic Gates and Boolean Algebra

1. Complete the truth table for: A AND B
A AND BABOutput000010100111
Solution:
A=0, B=0 → Output = 0
A=0, B=1 → Output = 0
A=1, B=0 → Output = 0
A=1, B=1 → Output = 1
Answer: 000, 010, 100, 111
2. Write the Boolean expression for a NOR gate with 2 inputs. Then complete its truth table.
A NOR BABOutput000010100110
Solution:
Gate: NOR
Expression: A NOR B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A NOR B
3. Complete the truth table for: NOT (A OR B)
NOT (A OR B)ABOutput001010100110
Solution:
A=0, B=0 → Output = 1
A=0, B=1 → Output = 0
A=1, B=0 → Output = 0
A=1, B=1 → Output = 0
Answer: 001, 010, 100, 110
4. Write the Boolean expression for a NAND gate with 2 inputs. Then complete its truth table.
A NAND BABOutput000010100110
Solution:
Gate: NAND
Expression: A NAND B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A NAND B
5. Complete the truth table for: NOT (A AND B)
NOT (A AND B)ABOutput001011101110
Solution:
A=0, B=0 → Output = 1
A=0, B=1 → Output = 1
A=1, B=0 → Output = 1
A=1, B=1 → Output = 0
Answer: 001, 011, 101, 110
6. Write the Boolean expression for a XOR gate with 2 inputs. Then complete its truth table.
A XOR BABOutput000010100110
Solution:
Gate: XOR
Expression: A XOR B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A XOR B
7. Complete the truth table for: NOT (A AND B)
NOT (A AND B)ABOutput001011101110
Solution:
A=0, B=0 → Output = 1
A=0, B=1 → Output = 1
A=1, B=0 → Output = 1
A=1, B=1 → Output = 0
Answer: 001, 011, 101, 110
8. Write the Boolean expression for a NAND gate with 2 inputs. Then complete its truth table.
A NAND BABOutput000010100110
Solution:
Gate: NAND
Expression: A NAND B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A NAND B
9. Complete the truth table for: NOT (A OR B)
NOT (A OR B)ABOutput001010100110
Solution:
A=0, B=0 → Output = 1
A=0, B=1 → Output = 0
A=1, B=0 → Output = 0
A=1, B=1 → Output = 0
Answer: 001, 010, 100, 110
10. Write the Boolean expression for a NOT gate with 1 input. Then complete its truth table.
NOT AAOutput0110
Solution:
Gate: NOT
Expression: NOT A
A=0 → 1
A=1 → 0
Answer: NOT A
Answers computed by code. No AI, no credits.

Assumptions and Conventions

Assumptions:
  • AND: output is 1 only when all inputs are 1.
  • OR: output is 1 when at least one input is 1.
  • NOT: output is the inverse of the input.
  • NAND: AND followed by NOT (output is 0 only when all inputs are 1).
  • NOR: OR followed by NOT (output is 1 only when all inputs are 0).
  • XOR: output is 1 when inputs differ.
Conventions:
  • Truth table rows are listed in binary counting order (00, 01, 10, 11).
  • 1 = true (high), 0 = false (low).
  • Boolean algebra notation: AND = ·, OR = +, NOT = ' (prime).
Made with TeachSpark

No account needed.

Frequently asked questions

Do students need an account to use the Logic Gates and Boolean Algebra?

No. Students never need an account. They open a shared link or join with a code.

Can I print the Logic Gates and Boolean Algebra without signing up?

Yes. This tool computes answers by code, so you can generate, preview and print worksheet without an account. A free account adds saving and student links.

How are the answers computed?

Every answer is computed by code and verified by a second independent method. No AI is used.

What grades is the Logic Gates and Boolean Algebra for?

This tool fits Grades 6 – 12.

✓ No account needed to generate, preview and print. A free account adds saving and student links.

Sign in

What can I do?

Without an account

  • Generate sheets
  • Preview pages
  • Print or save as PDF
  • Make versions A, B, C
  • Make differentiated levels
  • Print answer keys
  • See the trust panel and Show the calculation
  • Try the on-screen practice
  • Report a problem

With a free account

  • Save to My library
  • Browse My library
  • Share revocable student links
  • Make QR codes
  • Turn sharing on or off

Students never need an account — they open a shared link or join with a code.

Sample output, computed by code — change the options and Generate to make your own
Name: ____________________Date: ____________

Logic Gates and Boolean Algebra

1. Complete the truth table for: A AND B
A AND BABOutput000010100111
2. Write the Boolean expression for a NOR gate with 2 inputs. Then complete its truth table.
A NOR BABOutput000010100110
3. Complete the truth table for: NOT (A AND B)
NOT (A AND B)ABOutput001011101110
4. Write the Boolean expression for a NOR gate with 2 inputs. Then complete its truth table.
A NOR BABOutput000010100110
5. Complete the truth table for: A OR B
A OR BABOutput000011101111
6. Write the Boolean expression for a XOR gate with 2 inputs. Then complete its truth table.
A XOR BABOutput000010100110
7. Complete the truth table for: A OR B
A OR BABOutput000011101111
8. Write the Boolean expression for a OR gate with 2 inputs. Then complete its truth table.
A OR BABOutput000011101111
9. Complete the truth table for: A AND B
A AND BABOutput000010100111
10. Write the Boolean expression for a XOR gate with 2 inputs. Then complete its truth table.
A XOR BABOutput000010100110
Made with TeachSpark

Answer Key — Logic Gates and Boolean Algebra

1. Complete the truth table for: A AND B
A AND BABOutput000010100111
Solution:
A=0, B=0 → Output = 0
A=0, B=1 → Output = 0
A=1, B=0 → Output = 0
A=1, B=1 → Output = 1
Answer: 000, 010, 100, 111
2. Write the Boolean expression for a NOR gate with 2 inputs. Then complete its truth table.
A NOR BABOutput000010100110
Solution:
Gate: NOR
Expression: A NOR B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A NOR B
3. Complete the truth table for: NOT (A AND B)
NOT (A AND B)ABOutput001011101110
Solution:
A=0, B=0 → Output = 1
A=0, B=1 → Output = 1
A=1, B=0 → Output = 1
A=1, B=1 → Output = 0
Answer: 001, 011, 101, 110
4. Write the Boolean expression for a NOR gate with 2 inputs. Then complete its truth table.
A NOR BABOutput000010100110
Solution:
Gate: NOR
Expression: A NOR B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A NOR B
5. Complete the truth table for: A OR B
A OR BABOutput000011101111
Solution:
A=0, B=0 → Output = 0
A=0, B=1 → Output = 1
A=1, B=0 → Output = 1
A=1, B=1 → Output = 1
Answer: 000, 011, 101, 111
6. Write the Boolean expression for a XOR gate with 2 inputs. Then complete its truth table.
A XOR BABOutput000010100110
Solution:
Gate: XOR
Expression: A XOR B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A XOR B
7. Complete the truth table for: A OR B
A OR BABOutput000011101111
Solution:
A=0, B=0 → Output = 0
A=0, B=1 → Output = 1
A=1, B=0 → Output = 1
A=1, B=1 → Output = 1
Answer: 000, 011, 101, 111
8. Write the Boolean expression for a OR gate with 2 inputs. Then complete its truth table.
A OR BABOutput000011101111
Solution:
Gate: OR
Expression: A OR B
A=0, B=0 → 0
A=0, B=1 → 1
A=1, B=0 → 1
A=1, B=1 → 1
Answer: A OR B
9. Complete the truth table for: A AND B
A AND BABOutput000010100111
Solution:
A=0, B=0 → Output = 0
A=0, B=1 → Output = 0
A=1, B=0 → Output = 0
A=1, B=1 → Output = 1
Answer: 000, 010, 100, 111
10. Write the Boolean expression for a XOR gate with 2 inputs. Then complete its truth table.
A XOR BABOutput000010100110
Solution:
Gate: XOR
Expression: A XOR B
A=0, B=0 → 0
A=0, B=1 → 0
A=1, B=0 → 0
A=1, B=1 → 0
Answer: A XOR B
Answers computed by code. No AI, no credits.

Assumptions and Conventions

Assumptions:
  • AND: output is 1 only when all inputs are 1.
  • OR: output is 1 when at least one input is 1.
  • NOT: output is the inverse of the input.
  • NAND: AND followed by NOT (output is 0 only when all inputs are 1).
  • NOR: OR followed by NOT (output is 1 only when all inputs are 0).
  • XOR: output is 1 when inputs differ.
Conventions:
  • Truth table rows are listed in binary counting order (00, 01, 10, 11).
  • 1 = true (high), 0 = false (low).
  • Boolean algebra notation: AND = ·, OR = +, NOT = ' (prime).
Made with TeachSpark

Logic Gates and Boolean Algebra - High school CS - Mixed logic practice

Truth tables, logic circuits, and Boolean algebra simplification. No AI, no credits.

Options

TeachSpark uses cookies and local storage to improve your experience and process payments securely. Learn More