http://www.sw.it.aoyama.ac.jp/2013/Math1/lecture6.html
© 2005-13 Martin J. Dürst 青山学院大学
(A ∨ ¬B) ∧ B = (A ∧ B) ∨ (¬B ∧ B) = (A ∧ B) ∨ F = A ∧ B
四つの変数 (例: A, B, C,
D)
の論理関数を一つ、サイコロ等を使って作ってください。
その論理関数の二つの標準形と一つ以上の単純化を計算しなさい
Boolean functions other than and, or, not used frequently in programs and electronic circuits:
Boolean functions can be calculated (evaluated) using logic circuits
The relationship between logic formulæ and electric (electronic) circuits was established by Claude Shannon in his 1938 master thesis
The components of a logic circuit are called "gates"
Gates are connected with wires
The output of one gate is the input of another gate
In case of logic circuits, 1 and 0 are often used rather than true and false
NOT gate | AND gate | OR gate |
|
||
XOR gate | NAND gate | NOR gate |
|
Half adder (to add two binary numbers, two half adders per binary digit (bit) are necessary)
input | output | ||
A | B | S (sum) | C (carry) |
0 | 0 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
It is possible to implement all boolean functions using only NAND [or only NOR]
Proof:
We know that we can write any boolean function using only ∧, ∨, and ¬ (e.g. using a normal form)
If we can write these three boolean operations using only NAND [or only NOR], our proof is complete.
¬ A = NAND(A) [NOR(A)]
A ∧ B = ¬¬(A ∧
B) = NAND(¬(A ∧ B)) =
NAND(NAND(A, B))
[= ¬¬(A ∧ B) =
¬(¬A ∨ ¬B) = NOR(¬A, ¬B) =
NOR(NOR(A), NOR(B))]
A ∨ B = ¬¬(A ∨
B) = ¬(¬A ∧ ¬B) = NAND(¬A,
¬B) = NAND(NAND(A), NAND(B))
[= ¬¬(A ∨
B) = NOR(¬(A ∨ B)) = NOR(NOR(A,
B))]
Q.E.D.
(symbolic logic)
A | B | A ↔ B | A → B |
F | F | T | T |
F | T | F | T |
T | F | F | F |
T | T | T | T |
(「=」と「↔」などの使い分けに注意)
提出方法:
課題:
二つの変数 (例: A, B) で可能な論理関数を全て表に列挙し、それぞれの関数を NAND (又は NOR) の短い式だけで書きなさい。
発展問題: NAND と NOR 以外に一つの論理関数からすべての論理関数を作れるものはあるか調べなさい。例えば → ではどうでしょうか。