Source: https://goodhandover.co.uk/tools/truth-table-generator/

[Computer science maths](https://goodhandover.co.uk/tools/computer-science-maths/#year-1) / Year 1

🔒 Files never leave your device

# Truth table generator

Build a Boolean truth table and identify a tautology, contradiction or contingency. Your inputs stay on your device.

## Set up your task

Ready. Processing stays in this browser.

Files and text stay on your device. [Privacy details](https://goodhandover.co.uk/privacy/).

 

## How to use Truth table generator

Build a Boolean truth table and identify a tautology, contradiction or contingency. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

 

- Check the example inputs: Boolean expression.

- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.

- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

 

## Supported inputs and limits

Use up to six variables A–Z. Operators are ! (not), & (and), ^ (xor), | (or), -> (implies) and <-> (if and only if). Parentheses group terms.

 

## How it works

A truth table names every possible assignment of Boolean values and evaluates the expression for each row. Logical equivalence means that two expressions produce the same column for all assignments. A single differing row gives a counterexample and is often the quickest way to diagnose a proof attempt.

The parser applies negation first, then and, xor, or, implication and equivalence. Implication associates to the right. Parentheses make an intended grouping clear when a course uses different conventions. The table has two to the power of the number of variables rows, so each extra variable doubles its size.

 

## Example

Run the pre-filled example. Its first result is “Tautology”.

Boolean expression

(A -> B) <-> (!B -> !A)

Tautology
A  B  Result
0  0  1
0  1  1
1  0  1
1  1  1

 

## Questions about Truth table generator

### What does XOR do?

It returns true when its operands differ. XOR of A and B can be written (A & !B) | (!A & B).

### When is A implies B false?

Only when A is true and B is false. In that row the condition is met but the promised consequence fails.

### Run the formula A & !A.

Every row is false, so the classification is Contradiction. Try A | !A next and compare the final column.

 
 

## Related tools

[Year 1: Foundations](https://goodhandover.co.uk/tools/computer-science-maths/#year-1)

- [IEEE 754 float converter](https://goodhandover.co.uk/tools/ieee-754-converter/)

- [Set operations calculator](https://goodhandover.co.uk/tools/set-operations-calculator/)

- [Two’s complement calculator](https://goodhandover.co.uk/tools/twos-complement-calculator/)

- [Two-set Venn calculator](https://goodhandover.co.uk/tools/venn-diagram-calculator/)

 

Last updated 24 November 2026
