← 返回资讯屏轩教育 · 行业资讯

Logic Gates: Basic Circuits and Truth Tables | 逻辑门:基本电路与真值表

2026-08-30 22:49 · 本文部分内容由AI辅助创作

📚 Logic Gates: Basic Circuits and Truth Tables | 逻辑门:基本电路与真值表

Logic gates are the fundamental building blocks of digital circuits. They take one or more binary inputs and produce a single binary output based on a defined logical operation. In A-Level Computer Science, understanding logic gates, their symbols, truth tables, and how they combine into circuits is essential.

逻辑门是数字电路的基本构件。它们接收一个或多个二进制输入,并根据定义好的逻辑运算产生一个二进制输出。在 A-Level 计算机科学中,理解逻辑门、其符号、真值表以及它们如何组合成电路是至关重要的。


1. Why Logic Gates Matter | 为什么逻辑门很重要

Every digital device, from a simple calculator to a modern CPU, relies on logic gates to process data. These gates operate on binary values: 1 (true / high voltage) and 0 (false / low voltage). By combining thousands of gates, engineers can build complex systems such as adders, multiplexers, and memory units.

从简单的计算器到现代的 CPU,每一个数字设备都依赖逻辑门来处理数据。这些门基于二进制值工作:1(真/高电压)和 0(假/低电压)。通过组合成千上万个门,工程师可以构建诸如加法器、多路选择器和存储单元等复杂系统。

In the CIE syllabus, you are expected to recognise the standard symbols, construct truth tables, derive Boolean expressions, and interpret combined circuits.

在 CIE 教学大纲中,你需要识别标准符号、构建真值表、推导布尔表达式,并解释组合电路。


2. Basic Gates: AND, OR, NOT | 基本门:与门、或门、非门

AND gate produces an output of 1 only when all of its inputs are 1. Its Boolean expression is written as A · B (or simply AB).

与门(AND) 仅当其所有输入均为 1 时,输出才为 1。其布尔表达式写作 A · B(或简写为 AB)。

OR gate produces an output of 1 when at least one input is 1. Its Boolean expression is written as A + B.

或门(OR) 当至少一个输入为 1 时,输出为 1。其布尔表达式写作 A + B。

NOT gate (inverter) flips the input: output is the opposite of the input. Its Boolean expression is written as Ā (or Ā, or NOT A).

非门(NOT)(反相器)将输入取反:输出是输入的反值。其布尔表达式写作 Ā(或 Ā,或 NOT A)。

These three gates are sufficient to build any possible logical circuit, but other gates are used for convenience and efficiency.

这三个门足以构建任何逻辑电路,但为了便利和高效,还会使用其他门。


3. Universal Gates: NAND and NOR | 通用门:与非门和或非门

NAND gate is an AND gate followed by a NOT gate. Its output is the inverse of the AND output. Boolean expression: A NAND B = NOT (A · B), often written as A ↑ B or (A·B) with an overline.

与非门(NAND) 是与门后接非门。其输出是与门输出的反相。布尔表达式:A NAND B = NOT (A · B),常写作 A ↑ B 或 (A·B) 上方加横线。

NOR gate is an OR gate followed by a NOT gate. Boolean expression: A NOR B = NOT (A + B), written as A ↓ B or (A+B) with an overline.

或非门(NOR) 是或门后接非门。布尔表达式:A NOR B = NOT (A + B),写作 A ↓ B 或 (A+B) 上方加横线。

NAND and NOR are called universal gates because you can construct AND, OR, and NOT gates using only NAND gates (or only NOR gates). This property is important for circuit simplification and chip manufacturing.

与非门和或非门被称为通用门,因为仅使用与非门(或仅使用或非门)就可以构建与门、或门和非门。这种特性对于电路简化和芯片制造非常重要。


4. Exclusive Gates: XOR and XNOR | 异或门和同或门

XOR (exclusive OR) gate outputs 1 when the inputs are different. Boolean expression: A XOR B = A ⊕ B (or A·B̄ + Ā·B).

异或门(XOR) 当输入不同时输出 1。布尔表达式:A XOR B = A ⊕ B(或 A·B̄ + Ā·B)。

XNOR (exclusive NOR) gate outputs 1 when the inputs are the same. Boolean expression: A XNOR B = NOT (A ⊕ B), often written as A ⊙ B.

同或门(XNOR) 当输入相同时输出 1。布尔表达式:A XNOR B = NOT (A ⊕ B),常写作 A ⊙ B。

XOR gates are widely used in arithmetic circuits, particularly for addition (half adders and full adders).

异或门广泛用于算术电路,特别是加法操作(半加器和全加器)。


5. Truth Tables for All Basic Gates | 所有基本门的真值表

A truth table lists every possible combination of inputs and the corresponding output. For two inputs, there are 4 combinations. For n inputs, there are 2ⁿ combinations.

真值表列出所有可能的输入组合及对应的输出。对于两个输入,有 4 种组合。对于 n 个输入,有 2ⁿ 种组合。

ABANDORNANDNORXORXNOR
00001101
01011010
10011010
11110001

For the NOT gate (single input):

对于非门(单输入):

ANOT A
01
10

6. Circuit Symbols | 电路符号

You must be able to recognise and draw the standard IEC (International Electrotechnical Commission) symbols for logic gates. These are used in CIE examinations.

你必须能够识别和绘制逻辑门的标准 IEC(国际电工委员会)符号。CIE 考试中使用这些符号。

Note: In some questions you may also see the older rectangular symbols. Make sure you use the symbols taught in your syllabus to avoid losing marks.

注意:某些题目中也可能出现较旧的矩形符号。请务必使用你教学大纲中教授的符号,以免失分。


广告 / Sponsored

7. Combined Logic Circuits | 组合逻辑电路

A combined logic circuit uses multiple gates connected together to perform a more complex function. To analyse a circuit, you should label intermediate outputs and work step by step.

组合逻辑电路使用多个门连接起来实现更复杂的功能。分析电路时,应标出中间输出并逐步推导。

Example: Given a circuit with inputs A and B going into an AND gate, and input C going through a NOT gate; the outputs of these two gates feed into an OR gate. The final output X can be written as:

示例:一个电路,A 和 B 输入与门,C 经过非门;这两个门的输出再输入或门。最终输出 X 可写为:

X = (A · B) + C̄

To write the truth table, first list all combinations of A, B, C (8 rows). Then compute the AND output, then the NOT output, and finally the OR output.

要写出真值表,先列出 A、B、C 的所有组合(8 行),然后计算与门输出、非门输出,最后计算或门输出。

ABCA · BC̄X = (A·B) + C̄
000011
001000
010011
011000
100011
101000
110111
111101

8. Boolean Expression from a Circuit | 从电路推导布尔表达式

When given a logic circuit, you can derive its Boolean expression by identifying each gate and writing the output in terms of its inputs. Work from left to right, labelling each intermediate output.

给定逻辑电路时,可以通过识别每个门并用其输入写出输出来推导布尔表达式。从左到右依次标出每个中间输出。

For example, if a circuit has inputs P and Q entering a NAND gate, and the output enters a NOT gate, the final expression is:

例如,如果电路输入 P 和 Q 进入与非门,其输出再进入非门,则最终表达式为:

Y = NOT (P NAND Q) = (P · Q)

This is actually equivalent to an AND gate, because double inversion cancels out. Recognising such equivalences can help simplify expressions.

这实际上等价于一个与门,因为双重取反相互抵消。识别这种等价关系有助于简化表达式。

Common equivalences you should know:

你应该掌握的常见等价关系:


9. Constructing Circuits from Boolean Expressions | 根据布尔表达式构建电路

To draw a circuit from a Boolean expression, identify the main operations and their order. Use brackets to determine precedence: expressions inside brackets should be built first.

要根据布尔表达式绘制电路,先确定主要运算及其顺序。使用括号判断优先级:括号内的表达式应优先构建。

Example: Draw a circuit for X = (A + B) · C̄.

示例:绘制 X = (A + B) · C̄ 的电路。

  1. Build OR gate with inputs A and B to produce A + B.
  2. 中文:用输入 A 和 B 构建或门,产生 A + B。
  3. Pass C through a NOT gate to produce C̄.
  4. 中文:将 C 通过非门产生 C̄。
  5. Feed the outputs of the OR gate and the NOT gate into an AND gate.
  6. 中文:将或门和非门的输出送入与门。

The final output is X. This process is systematic and works for any expression using basic gates.

最终输出为 X。这个过程是系统化的,适用于任何使用基本门的表达式。


10. Exam Tips and Common Mistakes | 考试技巧与常见错误

Here are some important tips to avoid losing marks in logic gate questions:

以下是一些避免在逻辑门题目中失分的重要提示:

By mastering these fundamentals, you will be well-prepared for logic gate questions in the CIE A-Level Computer Science examination.

掌握这些基础知识后,你将为 CIE A-Level 计算机科学考试中的逻辑门题目做好充分准备。

Published by TutorHao | Computer Science Revision Series | aleveler.com

广告 / Sponsored
现货 Cambridge International AS & ALevel IT Coursebook剑桥国际IGC…
计算机 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥467.0

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao