Truth Table Generator
Generate a full truth table for a boolean logic expression, evaluating every combination of its variables. Accepts words (and/or/not/xor), symbols (&&, ||, !, ^), or math notation (∧, ∨, ¬, ⊕).
Input
Up to 6 variables. Operators: and/or/not/xor, &&/||/!/^, or ∧/∨/¬/⊕ — any mix works.
Output
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/truth-table-generator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expression": "A and B"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `truth-table-generator` tool (Truth Table Generator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/truth-table-generator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Truth Table Generator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
The Truth Table Generator evaluates a boolean logic expression against every possible combination of its variables' true/false values, and lays the results out as a table.
How to use it
- Type a boolean expression using the variables you want (single letters like
A,B,Care the usual convention, but any name works). - Read the table: one row per combination of variable values, with the expression's result in the last column.
Supported operators
Write AND, OR, NOT and XOR however you're used to — all of these notations work interchangeably in the same expression:
| Operator | Words | Symbols | Math notation |
|---|---|---|---|
| AND | and |
&&, & |
∧ |
| OR | or |
||, | |
∨ |
| NOT | not |
!, ~ |
¬ |
| XOR | xor |
^ |
⊕, ⊻ |
Words are case-insensitive (AND, And, and all work). Parentheses group sub-expressions as usual: A and (B or not C).
Expressions are limited to 6 variables (64 rows) — past that a table stops being a useful way to read the result; a Karnaugh map or a minimizer is the right tool for larger functions.
Example
A && (B || !C) produces:
| A | B | C | Result |
|---|---|---|---|
| T | T | T | T |
| T | T | F | T |
| T | F | T | F |
| T | F | F | T |
| F | T | T | F |
| F | T | F | F |
| F | F | T | F |
| F | F | F | F |
Common uses
Checking a logic circuit's behavior, verifying a conditional expression in code covers every case you expect, or working through propositional-logic homework.
Privacy
Everything runs entirely in your browser — your expression is never uploaded or stored anywhere.