# 与非门

**与非门**是一种数字逻辑门，仅当其所有输入均为逻辑一时，输出才为逻辑零；在其他任何输入组合下，其输出均为逻辑一<sup>[1](https://dc.etsu.edu/computer-organization-design-oer/39/)</sup>。其名称源自“非与”：它是在与门之后接一个反相器，因此其输出是各输入进行与运算所得结果的补<sup>[2](https://www.jmc.edu/econtent/pg/4781_UNIT%20II-DIGITAL%20LOGIC%20FUNDAMENDALS.pdf)</sup>。对于两个输入A和B，布尔表达式为 \( \overline{A \cdot B} \)，也可用[谢弗竖](https://www.edgepedia.org/zh/sheffer-stroke)线写作 \( A \uparrow B \)<sup>[3](https://www.physics.umd.edu/hep/drew/programmable/)</sup>。

| 关键事实 | 详情 |
|---|---|
| 真值表（2输入） | 00 → 1，01 → 1，10 → 1，11 → 0；仅当两个输入均为高时输出为低<sup>[1](https://dc.etsu.edu/computer-organization-design-oer/39/)</sup><sup> • </sup><sup>[4](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)</sup> |
| 表达式 | \( \overline{A \cdot B} \equiv A \uparrow B \)，即与函数的补<sup>[3](https://www.physics.umd.edu/hep/drew/programmable/)</sup> |
| 通用性 | 与、或、非、或非、异或、同或均可仅用与非门实现，因此任何布尔函数都可仅由与非门构建<sup>[2](https://www.jmc.edu/econtent/pg/4781_UNIT%20II-DIGITAL%20LOGIC%20FUNDAMENDALS.pdf)</sup><sup> • </sup><sup>[5](https://blue.cs.sonoma.edu/~bob/IntroCompOrg-x64/bookch4.html)</sup> |
| CMOS优势 | 与非门是一个CMOS门，含一个上拉网络和一个下拉网络；而与门需要一个与非门后接一个反相器，共两个门<sup>[6](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)</sup> |
| 标准集成电路 | 7400集成电路是四路二输入与非门；7402是与之对应的或非门，7420是四输入与非门<sup>[7](https://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/nand.html)</sup> |
| 非结合性 | NAND(A,B,C)不等于NAND(NAND(A,B),C)，因此宽输入与非函数不能简单构建为二输入与非门的树形结构<sup>[6](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)</sup> |

## 真值表与行为

二输入与非门对每一对输入产生如下输出<sup>[4](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)</sup>：

| a | b | a 与非 b |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |

等价地说，该门通常为高电平，仅当两个输入均为高时才变为低电平<sup>[7](https://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/nand.html)</sup>。根据德摩根定律，\( \overline{x \cdot y} = \bar{x} + \bar{y} \)，因此同一门可以画成或门形状且两个输入均取反；两种画法计算的是完全相同的函数<sup>[5](https://blue.cs.sonoma.edu/~bob/IntroCompOrg-x64/bookch4.html)</sup><sup> • </sup><sup>[8](https://my.eng.utah.edu/~kalla/ECE6745/ch2-universal-logic.pdf)</sup>。

## 通用性

**为何一种门便足够。** 每个布尔函数都可写成真值表，而从真值表可以仅用非、与、或综合出积之和表达式<sup>[9](https://www.cs.cornell.edu/courses/cs3410/2025sp/notes/logic.html)</sup>。德摩根定律将或归约为非和与，因为 \( a \lor b = \overline{\bar{a} \cdot \bar{b}} \)<sup>[4](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)</sup>。若非和与都能用与非门构建，则每个函数都可仅用与非门构建<sup>[4](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)</sup>。

**三种基本构造。** 非门（反相器）通过将一个与非门的两个输入接在一起实现，得到 \( \overline{A \cdot A} = \bar{A} \)<sup>[2](https://www.jmc.edu/econtent/pg/4781_UNIT%20II-DIGITAL%20LOGIC%20FUNDAMENDALS.pdf)</sup>。与门是一个与非门后接一个用作反相器的与非门，因为 \( \overline{(\overline{A \cdot B})} = A \cdot B \)；这将一个与门替换为两个与非门<sup>[2](https://www.jmc.edu/econtent/pg/4781_UNIT%20II-DIGITAL%20LOGIC%20FUNDAMENDALS.pdf)</sup><sup> • </sup><sup>[3](https://www.physics.umd.edu/hep/drew/programmable/)</sup>。[或门](https://www.edgepedia.org/zh/or-gate)由德摩根定律得出：用与非门对每个输入取反，再将结果合并<sup>[4](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)</sup>。同样的三种构造也可实现或非、异或和同或<sup>[2](https://www.jmc.edu/econtent/pg/4781_UNIT%20II-DIGITAL%20LOGIC%20FUNDAMENDALS.pdf)</sup>。[或非门](https://www.edgepedia.org/zh/nor-gate)也具有这一性质，二者合称通用门；非反相门——与门和或门——无法产生反相，因此不具备这种通用性<sup>[7](https://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/nand.html)</sup>。

这一基本思想早于硬件出现。这些构造可追溯至19世纪末美国逻辑学家和哲学家查尔斯·桑德斯·皮尔士（Charles Sanders Peirce）的工作，他早在晶体管问世之前就奠定了这些功能完备系统的基础<sup>[10](https://www.uvm.edu/~cbcafier/cs2210/content/04_logic_gates/logic_gates.html)</sup>。

## CMOS中的实现

在CMOS技术中，单个门天然具有反相特性。与非门或或非门是单个CMOS门，含一个上拉电路和一个下拉电路；而与门或或门需要两个CMOS门，例如一个与非门后接一个反相器<sup>[6](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)</sup>。这是用CMOS设计低成本、高性能电路的关键：设计者使用反相逻辑，并利用德摩根定律将一层门的反相输出与下一层门的反相输入相匹配<sup>[6](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)</sup>。

积之和表达式——从真值表得出的标准配方——直接映射到两层与非门电路：第一层与非门形成乘积项，第二层与非门将它们合并，内部的反相相互抵消<sup>[6](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)</sup><sup> • </sup><sup>[8](https://my.eng.utah.edu/~kalla/ECE6745/ch2-universal-logic.pdf)</sup>。

**输入数量的限制。** 与与门和或门不同，与非运算不满足结合律：NAND(A,B,C)不同于NAND(NAND(A,B),C)。因此宽输入与非门不能构建为二输入与非门的树。相反，德摩根定律表明如何用交替的与非门和或非门树来构建多输入的反相逻辑<sup>[6](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)</sup>。

## 实际应用

由于任何电路都可用单一门类型构建，制造商获得双重好处：与非门比其他许多门制造成本更低，且复杂电路用一种重复元件比用多种门类型更易于构建和验证<sup>[11](https://www.sci.brooklyn.cuny.edu/~briskman/cisc/2210/lecture_notes/topic_09/22.html)</sup>。经典例子是7400集成电路——一种四路二输入与非门封装，使基于与非门的设计变得实用；相关型号包括7402四路或非门和7420四输入与非门<sup>[7](https://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/nand.html)</sup>。在教学中，同一原理以构造性形式出现：仅从与非运算出发，可将非定义为 \( a \uparrow a \)，将与定义为 \( \overline{a \uparrow b} \)，并通过德摩根定律定义或，然后在此基础上构建后续每一块芯片，因此整台计算机原则上可以建立在与非门之上<sup>[4](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)</sup>。

## 与NAND闪存的关系

NAND一词也指NAND闪存，一种不具备逻辑门功能的存储技术。NAND闪存将数据存储在由浮栅晶体管构成的存储单元阵列中，每个晶体管有一个控制栅和一个电隔离的浮栅，在正常条件下可将电子捕获数年<sup>[12](https://download.semiconductor.samsung.com/resources/white-paper/Samsung_SSD_White_Paper.pdf)</sup>。单元按每单元存储的位数分类：单层单元（SLC）存1位，多层单元（MLC）存2位，三层单元（TLC）存3位，四层单元（QLC）存4位，每单元位数越多成本越低但运行越慢<sup>[13](https://semiconductor.samsung.com/support/tools-resources/dictionary/semiconductors-101-part-2-different-types-of-nand-flash/)</sup>。该名称指的是单元阵列的串联布线，类似于[与非逻辑](https://www.edgepedia.org/zh/nand-logic)结构，而非该门的任何计算用途。

## References

1. [Tarnoff, David. "Episode 5.02 – NAND Logic." Computer Organization and Design Fundamentals Series, East Tennessee State University (2020).](https://dc.etsu.edu/computer-organization-design-oer/39/)
2. ["Realization of Logic Functions with the Help of Universal Gates." Jagannath University e-content, Digital Logic Fundamentals, Unit II.](https://www.jmc.edu/econtent/pg/4781_UNIT%20II-DIGITAL%20LOGIC%20FUNDAMENDALS.pdf)
3. ["A Thinking Person's Guide to Programmable Logic," University of Maryland.](https://www.physics.umd.edu/hep/drew/programmable/)
4. ["Boolean Logic & Skills," CSE 390b readings, University of Washington.](https://courses.cs.washington.edu/courses/cse390b/22wi/readings/boolean_logic.html.bak)
5. ["4 Logic Gates," Introductory Computer Organization (x86-64), Sonoma State University.](https://blue.cs.sonoma.edu/~bob/IntroCompOrg-x64/bookch4.html)
6. ["4.1 Annotated Slides," 6.004 Computation Structures, MIT OpenCourseWare (Spring 2017).](https://ocw.mit.edu/courses/6-004-computation-structures-spring-2017/pages/c4/c4s1/)
7. ["NAND Gate," HyperPhysics, Georgia State University.](https://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/nand.html)
8. ["ch2-universal-logic," ECE 6745, University of Utah.](https://my.eng.utah.edu/~kalla/ECE6745/ch2-universal-logic.pdf)
9. ["Gates & Logic," CS 3410, Cornell University (2025).](https://www.cs.cornell.edu/courses/cs3410/2025sp/notes/logic.html)
10. [Cafiero, Clayton. "Logic gates," CS 2210, University of Vermont.](https://www.uvm.edu/~cbcafier/cs2210/content/04_logic_gates/logic_gates.html)
11. [Briskman, Miriam. "Universal Gates: NAND and NOR," CISC 2210 lecture notes, Brooklyn College, CUNY.](https://www.sci.brooklyn.cuny.edu/~briskman/cisc/2210/lecture_notes/topic_09/22.html)
12. ["NAND Basics: Understanding the Technology Behind Your SSD," Samsung SSD white paper.](https://download.semiconductor.samsung.com/resources/white-paper/Samsung_SSD_White_Paper.pdf)
13. ["Types of NAND Flash," Samsung Semiconductor.](https://semiconductor.samsung.com/support/tools-resources/dictionary/semiconductors-101-part-2-different-types-of-nand-flash/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Semiconductor devices & fabrication › Integrated circuits and chip families

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/nand-gate

English original: https://www.edgepedia.org/nand-gate
