6 / 63 · 概念
Universal gates: build circuits using only NAND
Construct NOT, AND, OR and XOR from NAND and distinguish gate count from delay.
レッスンは無料で読めます。受講登録すると進捗を保存できます。
翻訳はまだありません。元の講義を表示しています。 (English)
Functional completeness has a precise scope
NAND can construct NOT, AND and OR, which can express any finite combinational Boolean function. This is functional completeness, not a claim about storage, power or timing.
AND is a NAND followed by another NAND with tied inputs. OR follows from De MorganDe Morgan NOT of an AND equals OR of the complemented inputs. NOT of an OR equals AND of the complemented inputs. Learn more:
NOR can similarly create inversioninversion The NOT operation exchanges 0 and 1. An overline applies NOT to the entire expression covered by the line. Learn more by tying inputs and is also universal.
Four NAND gates make XOR
| a | b | n0 | n1 | n2 | y |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 |
- First NAND: n0 = NAND(a, b)
- Two parallel NANDs: n1 = NAND(a, n0); n2 = NAND(b, n0)
- Final NAND: y = NAND(n1, n2)
There are four gates but three stages on the longest path. At a simplified 2 ns bound per gate, the maximum path sum is 6 ns. Real loading and wiring affect physical delay.
| a | b | y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Verify every row. Functional equivalence says outputs agree, not that implementations have equal cost or timing.
自分で考えてみましょう
Construct NOT and AND using only NOR. How many gates and levels does your AND implementation use?
解説を見る
NOT a=NOR(a,a). AND=NOR(NOR(a,a),NOR(b,b)): three gates total and two levels on the longest path.