异或多数代数逻辑
XOR Majority Algebraic Logic
如何仅使用 XOR 和 AND 实现多数函数? 这篇论文的作者是如何得出他们下面给出的等式的?
A Majority Function with three inputs can be written as CNF(总和的乘积)
(a or b) and (a or c) and (b or c)
或DNF(乘积之和)
ab or ac or bc
使用AND和XOR,你可以写
maj(a,b,c) = ab xor bc xor ac
A truth-table 可能是最简单的检查方法。如果一个输入为真或所有三个输入为真,则具有三个输入的 XOR 为真。
ab
00 01 11 10
+---+---+---+---+
0 | 0 | 0 | 1 | 0 |
c +---+---+---+---+
1 | 0 | 1 | 1 | 1 |
+---+---+---+---+
如何仅使用 XOR 和 AND 实现多数函数?
A Majority Function with three inputs can be written as CNF(总和的乘积)
(a or b) and (a or c) and (b or c)
或DNF(乘积之和)
ab or ac or bc
使用AND和XOR,你可以写
maj(a,b,c) = ab xor bc xor ac
A truth-table 可能是最简单的检查方法。如果一个输入为真或所有三个输入为真,则具有三个输入的 XOR 为真。
ab
00 01 11 10
+---+---+---+---+
0 | 0 | 0 | 1 | 0 |
c +---+---+---+---+
1 | 0 | 1 | 1 | 1 |
+---+---+---+---+