Truth Table Generator

Generate complete truth tables for any Boolean expression. Perfect for digital logic courses, circuit design, and Boolean algebra homework.

✓ Multiple variables ✓ Export to CSV ✓ Step-by-step solutions

Use AND, OR, NOT operators. Parentheses supported.

What is a Truth Table?

A truth table is a mathematical table that shows all possible truth values for a Boolean expression. It systematically lists every possible combination of input values and their corresponding output values, making it an essential tool for analyzing digital logic circuits and Boolean algebra.

How to Use This Truth Table Generator

  1. Enter your Boolean expression using variables like A, B, C, etc.
  2. Use logical operators: AND, OR, NOT (parentheses supported)
  3. Click "Generate Truth Table" to see the complete table
  4. Export results as CSV or copy to clipboard for use in other applications

Supported Operators

  • AND: Use "AND", "*", or "·" (e.g., A AND B)
  • OR: Use "OR" or "+" (e.g., A OR B)
  • NOT: Use "NOT", "!", or "¬" (e.g., NOT A)
  • Parentheses: Use () to group operations (e.g., (A AND B) OR C)

Examples & Worked Problems

Example 1: Simple AND Gate

Expression: A AND B

This represents a basic AND gate with two inputs. The output is true (1) only when both A and B are true.

Example 2: OR with NOT

Expression: A OR NOT B

This expression is true when either A is true OR B is false (or both conditions are met).

Example 3: Complex Expression

Expression: (A AND B) OR (NOT A AND C)

This demonstrates operator precedence and grouping. The expression evaluates to true when either both A and B are true, or when A is false and C is true.

Tips, Edge Cases & Limitations

Best Practices

  • Use clear variable names (single letters work best)
  • Group complex expressions with parentheses for clarity
  • Test simple expressions first before building complex ones

Limitations

  • Maximum of 10 variables (for performance reasons)
  • Variable names must be single letters
  • Case-sensitive variable names (A and a are different)

Frequently Asked Questions

What's the difference between AND and OR operations?

AND operations require ALL inputs to be true for the output to be true. OR operations require at least ONE input to be true for the output to be true.

How do I handle NOT operations?

NOT operations invert the input value. If the input is true (1), NOT makes it false (0), and vice versa. You can write NOT A, !A, or ¬A.

Can I use this for homework assignments?

Yes! This tool is designed to help students learn Boolean algebra and digital logic. The step-by-step explanations help you understand the process, not just get the answer.

Why are there 2^n rows in a truth table?

Each variable can have 2 possible values (true or false). With n variables, there are 2×2×...×2 (n times) = 2^n possible combinations.

How do I read the truth table results?

Each row represents one possible combination of input values. The rightmost column shows the output for that specific combination of inputs.

Related Tools

References & Further Reading

  • Digital Design and Computer Architecture by Harris & Harris
  • Boolean Algebra and Logic Gates - Khan Academy
  • Introduction to Digital Logic Design - MIT OpenCourseWare

Expert Review

This calculator has been reviewed for accuracy by digital logic educators and follows standard Boolean algebra conventions.

Last updated: 10/29/2025 | Reviewed by: Digital Logic Education Team