📚 The Function of the Six Logic Gates | 六种逻辑门的功能
Logic gates are the fundamental building blocks of all digital electronic circuits. In this revision article, we will examine the six essential logic gates: NOT, AND, OR, NAND, NOR and XOR. We will explore their symbols, truth tables, Boolean expressions and typical applications, so that you can confidently answer any IGCSE Cambridge Science question on this topic.
逻辑门是所有数字电子电路的基本构建模块。在本复习文章中,我们将研究六种基本逻辑门:非门(NOT)、与门(AND)、或门(OR)、与非门(NAND)、或非门(NOR)和异或门(XOR)。我们将探讨它们的符号、真值表、布尔表达式和典型应用,以便你能自信地回答剑桥IGCSE科学中关于该主题的任何问题。
1. What is a Logic Gate? | 什么是逻辑门?
A logic gate is an electronic component that takes one or more binary inputs and produces a single binary output. In digital circuits, a binary signal has only two possible values: 0 (low voltage) and 1 (high voltage). The behaviour of each gate is defined by a set of simple rules called Boolean logic, named after the mathematician George Boole.
逻辑门是一种电子元件,它接收一个或多个二进制输入,并产生一个二进制输出。在数字电路中,二进制信号只有两个可能的值:0(低电压)和1(高电压)。每个门的行为由一组称为布尔逻辑的简单规则定义,该规则以数学家乔治·布尔的名字命名。
In the IGCSE Cambridge Science syllabus, you are expected to know the function of each gate, its truth table, and its standard symbol. You may also be asked to solve simple logic circuits by tracing the output for given inputs.
在剑桥IGCSE科学大纲中,你需要了解每个门的功能、真值表和标准符号。你也可能会被要求通过追踪给定输入下的输出来求解简单的逻辑电路。
2. The NOT Gate | 非门
The NOT gate is also called an inverter because it inverts, or reverses, the input signal. It has one input and one output. If the input is 1, the output is 0; if the input is 0, the output is 1.
非门也称为反相器,因为它反转输入信号。它有一个输入和一个输出。如果输入为1,则输出为0;如果输入为0,则输出为1。
Q = NOT A
The standard symbol for a NOT gate is a triangle pointing to the right with a small circle (bubble) at the output. The bubble always means inversion. The truth table is:
非门的标准符号是一个指向右侧的三角形,输出端带有一个小圆圈(气泡)。小圆圈始终表示反相。其真值表如下:
| Input A | Output Q |
|---|---|
| 0 | 1 |
| 1 | 0 |
3. The AND Gate | 与门
The AND gate has two or more inputs and one output. The output is 1 only when all inputs are 1. If any input is 0, the output is 0. In everyday terms, the AND gate represents the condition “all requirements must be satisfied at the same time”.
与门有两个或更多输入和一个输出。只有当所有输入都为1时,输出才为1。如果任何一个输入为0,输出就为0。用日常语言来说,与门表示“所有条件必须同时满足”的情况。
Q = A AND B
The truth table for a two-input AND gate is:
两输入与门的真值表如下:
| Input A | Input B | Output Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
4. The OR Gate | 或门
The OR gate has two or more inputs and one output. The output is 1 when at least one input is 1. The output is 0 only when all inputs are 0. This represents the condition “any one of the requirements is enough”.
或门有两个或多个输入和一个输出。只要至少有一个输入为1,输出就为1。仅当所有输入都为0时,输出才为0。这表示“满足任意一个条件即可”的情况。
Q = A OR B
The truth table for a two-input OR gate is:
两输入或门的真值表如下:
| Input A | Input B | Output Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
5. The NAND Gate | 与非门
The NAND gate is a combination of an AND gate followed by a NOT gate. Its output is the exact opposite of the AND gate output. Therefore, the output is 0 only when all inputs are 1; in every other case, the output is 1.
与非门是与门后接非门的组合。它的输出与与门的输出完全相反。因此,仅当所有输入都为1时,输出才为0;在其他所有情况下,输出都为1。
Q = NOT (A AND B)
The NAND gate is called a universal gate because any other logic gate can be built using only NAND gates. Its truth table is:
与非门被称为通用门,因为仅使用与非门就可以构建任何其他逻辑门。其真值表如下:
| Input A | Input B | Output Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
6. The NOR Gate | 或非门
The NOR gate is a combination of an OR gate followed by a NOT gate. Its output is the exact opposite of the OR gate output. The output is 1 only when all inputs are 0; if any input is 1, the output is 0.
或非门是或门后接非门的组合。它的输出与或门的输出完全相反。仅当所有输入都为0时,输出才为1;如果任何一个输入为1,输出就为0。
Q = NOT (A OR B)
The NOR gate is also a universal gate. Its truth table is:
或非门也是通用门。其真值表如下:
| Input A | Input B | Output Q |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
7. The XOR Gate | 异或门
The XOR (exclusive OR) gate has two inputs and one output. Its output is 1 when the two inputs are different, and 0 when they are the same. In other words, for two inputs, the output is 1 only when exactly one input is 1.
异或门有两个输入和一个输出。当两个输入不同时,输出为1;当两个输入相同时,输出为0。换句话说,对于两个输入,仅当恰好一个输入为1时,输出才为1。
Q = A XOR B = A ⊕ B
The XOR gate is useful for comparing two binary digits. Its truth table is:
异或门常用于比较两个二进制数字。其真值表如下:
| Input A | Input B | Output Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
8. Comparing the Six Gates | 六种门的比较
The table below summarises all six logic gates. Remember that NAND and NOR are simply NOT versions of AND and OR, while XOR compares whether inputs are different.
下表总结了所有六种逻辑门。请记住,与非门和或非门只是与门和或门的非版本,而异或门则比较输入是否不同。
| Gate 门 | Expression 表达式 | Output is 1 when 输出为1的条件 |
|---|---|---|
| NOT | Q = NOT A | A = 0 |
| AND | Q = A AND B | A = 1 and B = 1 |
| OR | Q = A OR B | At least one input is 1 至少一个输入为1 |
| NAND | Q = NOT (A AND B) | Not both inputs are 1 并非两个输入都为1 |
| NOR | Q = NOT (A OR B) | All inputs are 0 所有输入都为0 |
| XOR | Q = A ⊕ B | Inputs are different 输入不同 |
9. Applications of Logic Gates | 逻辑门的应用
Logic gates appear in almost every digital system. In your IGCSE course, you are often asked to match a gate to a real-world situation, so it is helpful to remember a few classic examples.
逻辑门几乎出现在每一个数字系统中。在IGCSE课程中,你经常需要将门与实际情境进行匹配,因此记住一些经典例子会很有帮助。
- NOT gate: used in alarm systems to invert a sensor signal, or as a buffer/inverter in any digital circuit.
- AND gate: used in safety interlocks, for example a machine that only starts when two buttons are pressed together.
- OR gate: used in burglar alarms, where any one of several door or window sensors can trigger the alarm.
- NAND and NOR gates: used to build other logic gates, and in simple
Published by TutorHao | IGCSE Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply