| 定律名称 | 表达式 | |
| 结合律 Associative Law 可结合的,指运算的分组方式不影响结果 |
(A and B) and C = A and (B and C) |
操作符 都一样 |
| (A or B) or C = A or (B or C) |
||
| 分配律 Distributive Law 可分配的,类似算术中的乘法对加法的分配 |
A and (B or C) = (A and B) or (A and C) |
操作符 不同 |
| A or (B and C) = (A or B) and (A or C) |
||
| 吸收律 Absorption Law 指某项被“吸收”掉从而简化表达式 |
A or (A and B) = A | 只有 2个 操作数 |
| A and (A or B) = A | ||
| 德摩根定律 De Morgan's Law 由英国数学家Augustus De Morgan提出,是逻辑学和集合论中最重要的定律之一 |
not (A and B) = (not A) or (not B) |
这个nb |
| not (A or B) = (not A) and (not B) |