A truth table is the complete map of how a logic expression behaves, listing every possible combination of true and false for its variables alongside the result, and this generator builds one for you from any boolean expression you type. Enter something like (A AND B) OR NOT C using single capital letters for the variables and the operators AND, OR, NOT and XOR, and it works out which variables you have used, lays out all the combinations, and evaluates the expression for each row. With one variable there are two rows, with two variables four, with three eight, and so on, doubling each time, which is exactly why a table is so useful: it guarantees you have checked every case rather than reasoning about them in your head. The four core operators cover the whole of basic logic. AND is true only when both inputs are true, OR is true when at least one is, NOT flips a value to its opposite, and XOR, the exclusive or, is true only when the two inputs differ. Brackets let you control the order of evaluation so the expression means exactly what you intend. This makes the tool genuinely useful for computer science and digital electronics students learning boolean algebra and logic gates, for checking that two expressions are equivalent by comparing their tables, for simplifying circuits, and for anyone designing or debugging conditional logic in programming. Because the whole table regenerates as you type, you can experiment with different expressions and immediately see how adding a NOT or swapping an AND for an OR changes every outcome, which builds real intuition for how logic fits together. The operators and a worked example are explained clearly below.
The generator reads your expression, identifies the single-letter variables, and lists every combination of true (T) and false (F) for them, 2 to the power n rows for n variables. It then evaluates the expression for each row using standard logic: AND is true only if both sides are true, OR if either is, NOT inverts, and XOR is true only when the sides differ. Use brackets to control the order.
For A AND B there are two variables and four rows. The result is true only in the single row where both A and B are true, and false in the other three. Adding OR NOT C introduces a third variable and doubles the table to eight rows, with the result also true wherever C is false.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About
Reviewed and maintained. Last reviewed 2026-06-05 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2019 to 2026 Calculate.co.nz. All rights reserved.