Home / Calculators / Boolean Expression Converter
Free online tool

Boolean Expression Converter

Convert Boolean expressions between notations (algebraic, programming, textual) and get a truth table, DNF, and CNF. Supports NOT, AND, OR, up to 6 variables…

Start using

What the Boolean Expression Converter Does

This tool converts a Boolean expression from one notation style to another while preserving its logical behavior. It accepts expressions with variables (A-Z, a-z), parentheses, and the operators NOT (!), AND (&&), OR (||), and the constants true/false. The converter parses your input into an expression tree and then outputs the expression using the selected target notation, along with a truth table and canonical forms (DNF and CNF).

How to Use the Converter

  1. Enter your expression in the input field. For example: A && (B || !C).
  2. Select the target notation from the dropdown (e.g., algebraic with · and overbar, programming with && and !, or textual with AND, OR, NOT).
  3. Click the Convert button to see the result. The output includes the converted expression, a truth table, and the canonical disjunctive and conjunctive normal forms.

Worked Example

Input

A && (B || !C)

Converted Output (algebraic)

A · (B + C̅)

Truth Table (first rows)

A B C | Output
0 0 0 | 0
0 0 1 | 0
0 1 0 | 0
0 1 1 | 0
1 0 0 | 1

The truth table confirms that the output is true only when A is true and (B is true or C is false), matching the original expression.

Processing Rules and Limitations

  • Operator precedence: NOT has the highest precedence, then AND, then OR. Parentheses override precedence.
  • Variable count: The tool accepts at most six distinct variables. If you use more than six, an error is raised.
  • Case sensitivity: Variable names are case-sensitive (e.g., A and a are different), but operators and constants are case-insensitive.
  • Unsupported syntax: The tool does not support XOR, implication, equivalence, numeric 0/1 constants, or circuit diagrams. It also rejects malformed expressions and mismatched parentheses.
  • Canonical forms: The DNF and CNF are generated from the truth table and are not minimized. For simplification, use the separate Karnaugh-map tool.

Practical Checklist

  • Use single-letter variable names (A-Z, a-z) and avoid numbers or special characters.
  • Ensure all parentheses are balanced.
  • Use only supported operators: ! for NOT, && for AND, || for OR.
  • Check that you have no more than six distinct variables.
  • Verify the truth table rows to confirm the conversion preserves the logic.

Frequently Asked Questions

Why is my input rejected?

Your input may be rejected if it contains unsupported characters, malformed syntax, mismatched parentheses, or more than six distinct variables. Check that you are using only letters, parentheses, and the operators !, &&, ||. Also ensure that the expression is complete and correctly parenthesized.

Can I use this converter for XOR or other operators?

No, this converter only supports NOT, AND, and OR. XOR, implication, and equivalence are not supported. If you need to convert expressions with those operators, consider rewriting them using AND, OR, and NOT first.

Does the converter minimize the expression?

No, the converter outputs the expression in the selected notation without algebraic minimization. It also provides the canonical DNF and CNF, which are not simplified. For minimization, use the dedicated Karnaugh-map tool.

Processing takes place locally in your browser.