Boolean Truth Table Calculator

Build a complete truth table for an expression with variables A–F.

Variables used
2
Assignment rows
4
Truth table (R = result)
A B │ R 0 0 │ 0 0 1 │ 0 1 0 │ 0 1 1 │ 1

Aliases: * = AND (&), + = OR (|), ~ = NOT (!). Precedence: !, &, ^, |, ->, <->. Up to 256 characters and variables A–F; lowercase is accepted. Constants 0/1 and parentheses are supported.

Calculation and assumptions

0≡⊥; 1≡⊤; !≡¬; &≡∧; ^≡⊕; |≡∨; ->≡→; <->≡↔; N=2ⁿ.

Use variables A–F, constants 0/1 and parentheses. Precedence from highest to lowest: !, &, ^, |, ->, <->. Implication associates right; the other binary operators associate left. && and || are aliases. All assignments are listed; no expression is executed as code.

Every assignment is listed and results are exact Boolean 0/1 values. Up to six variables give at most 64 rows.

Aliases: * = AND (&), + = OR (|), ~ = NOT (!). Precedence: !, &, ^, |, ->, <->. Up to 256 characters and variables A–F; lowercase is accepted. Constants 0/1 and parentheses are supported.

Frequently asked questions

How is the result calculated?

0≡⊥; 1≡⊤; !≡¬; &≡∧; ^≡⊕; |≡∨; ->≡→; <->≡↔; N=2ⁿ.

What assumptions apply?

Use variables A–F, constants 0/1 and parentheses. Precedence from highest to lowest: !, &, ^, |, ->, <->. Implication associates right; the other binary operators associate left. && and || are aliases. All assignments are listed; no expression is executed as code.

How precise are the results?

Every assignment is listed and results are exact Boolean 0/1 values. Up to six variables give at most 64 rows.

How we verified this calculator

The calculator is checked against 6 reference cases computed independently of its code. Last passed: .

# Inputs Expected result
1
Expression (up to 256 characters) = A*B+~C
Variables used: 3
Assignment rows: 8
2
Expression (up to 256 characters) = a && b || !c
Variables used: 3
Assignment rows: 8
3
Expression (up to 256 characters) = A ∧ B ∨ ¬C
Variables used: 3
Assignment rows: 8
4
Expression (up to 256 characters) = A->B->C
Variables used: 3
Assignment rows: 8
5
Expression (up to 256 characters) = (A->B)->C
Variables used: 3
Assignment rows: 8
6
Expression (up to 256 characters) = A<->B
Variables used: 2
Assignment rows: 4

How we test our calculators →

Also try:

Back to category →