🔣 真值表生成器Truth Table Calculator
输入逻辑表达式(如 (A ∧ B) → ¬C、A xor B、p -> q),自动生成完整真值表,判断是否为重言式、矛盾式或可满足式,并给出最小项和主析取范式。Enter a logical expression such as (A ∧ B) → ¬C, A xor B or p -> q to get its full truth table, whether it is a tautology, contradiction or contingency, and its minterms and canonical DNF.
使用说明与常见问题How-to & FAQ
「真值表生成器」是什么?What is the Truth Table Calculator tool?
输入逻辑表达式(如 (A ∧ B) → ¬C、A xor B、p -> q),自动生成完整真值表,判断是否为重言式、矛盾式或可满足式,并给出最小项和主析取范式。Enter a logical expression such as (A ∧ B) → ¬C, A xor B or p -> q to get its full truth table, whether it is a tautology, contradiction or contingency, and its minterms and canonical DNF.
如何使用「真值表生成器」?How do I use the Truth Table Calculator tool?
在「真值表生成器」中,填写「逻辑表达式」、「真假显示」等参数,结果会随输入实时计算并显示在下方。In the Truth Table Calculator: Fill in "Logical expression", "Show values as"; results are recalculated instantly as you type.
支持哪些运算符?Which operators are supported?
与:and、&、&&、∧、·;或:or、|、||、∨、+;非:not、!、~、¬ 或后缀 ';异或:xor、^、⊕;蕴含:->、=>、→;等价:<->、<=>、↔、iff;以及 nand、nor、xnor。变量可以是单个字母,或以小写字母书写的单词(如 rain);连写的大写字母(如 AB)视为多个变量相“与”。变量区分大小写(A 和 a 是两个变量)。常量 0/1、true/false。AND: and, &, &&, ∧, ·; OR: or, |, ||, ∨, +; NOT: not, !, ~, ¬ or a trailing '; XOR: xor, ^, ⊕; IMPLIES: ->, =>, →; IFF: <->, <=>, ↔, iff; plus nand, nor and xnor. Variables can be single letters or words written in lower case (like rain); a run of capital letters such as AB means several variables ANDed together. Variables are case-sensitive (A and a are different). Constants are 0/1 and true/false.
运算优先级?What is the precedence?
从高到低:非 → 与(并列的变量视为“与”,如 AB、A B 或 A(B+C))→ 异或 → 或 → 蕴含(右结合)→ 等价。不确定时请加括号。Highest to lowest: NOT → AND (adjacent variables such as AB, A B or A(B+C) mean AND) → XOR → OR → IMPLIES (right-associative) → IFF. Add brackets when in doubt.
主析取范式是什么?What is the canonical DNF?
把所有使表达式为真的行(最小项)用“或”连接起来的形式,每个最小项包含全部变量。It ORs together every row where the expression is true (the minterms), each minterm containing every variable.
计算精度如何?How precise are the results?
「真值表生成器」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The Truth Table Calculator uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「真值表生成器」免费吗?需要注册吗?Is the Truth Table Calculator free? Do I need an account?
「真值表生成器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Truth Table Calculator is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.