Logic Analyzer

Enter a boolean expression to generate its truth table and see its evaluation. Use common operators like AND, OR, NOT, XOR, and parentheses.

Examples (click to use):

About the Logic Analyzer

This tool helps you understand and verify boolean logic expressions. It's useful for programmers, students learning about digital logic, and engineers working with hardware or software systems.

Supported Operators & Syntax

  • AND: A AND B, A && B, A & B, A * B
  • OR: A OR B, A || B, A | B, A + B
  • NOT: NOT A, !A, ~A
  • XOR: A XOR B, A ^ B
  • Parentheses: (A AND B) OR C for grouping.
  • Variables: Typically single uppercase or lowercase letters (e.g., A, b, X, y). Variable names can be longer but should not contain spaces or operator symbols.
  • Constants: true, false, 1, 0.

How it Works

The analyzer parses your input expression, identifies all unique variables, and then systematically evaluates the expression for every possible combination of truth values (true/false) for those variables. The results are displayed in a truth table.

For expressions with many variables (e.g., more than 5-6), the truth table can become very large (2n rows, where n is the number of variables). The tool may limit the number of variables to ensure performance.