Boolean Logic | 布尔逻辑

📚 Boolean Logic | 布尔逻辑

Boolean logic is the foundation of all digital electronics and computer systems. It is a branch of algebra that deals with true and false values, represented as 1 and 0, and is essential for understanding how computers make decisions. In the Cambridge IGCSE Science syllabus, Boolean logic introduces you to the basic building blocks of circuits: logic gates.

布尔逻辑是所有数字电子和计算机系统的基础。它是代数学的一个分支,处理真与假两种值,分别表示为 1 和 0,对于理解计算机如何做出决策至关重要。在剑桥 IGCSE 科学考纲中,布尔逻辑向你介绍电路的基本构建模块:逻辑门。


1. What Is Boolean Logic? | 什么是布尔逻辑?

Boolean logic is a system of logical thought developed by George Boole in the 19th century. It uses only two possible values: TRUE (1) and FALSE (0). These two values are called binary values. In a circuit, a high voltage (e.g., 5V) represents 1, while a low voltage (e.g., 0V) represents 0.

布尔逻辑是由乔治·布尔在19世纪提出的一套逻辑思维体系。它只使用两个可能的值:真(1)和假(0)。这两个值称为二值。在电路中,高电压(例如 5V)代表 1,而低电压(例如 0V)代表 0。

Every logical operation in a computer — from simple arithmetic to complex decision-making — can be reduced to combinations of basic Boolean operations. Understanding these operations allows you to analyse and design digital circuits.

计算机中的每一个逻辑操作——从简单算术到复杂决策——都可以归结为基本布尔运算的组合。理解这些运算,使你能分析和设计数字电路。


2. Logic Gates and Truth Tables | 逻辑门与真值表

A logic gate is an electronic component that performs a Boolean operation on one or more inputs and produces a single output. Each gate has a specific symbol and a truth table that lists all possible input combinations and the corresponding output.

逻辑门是一种电子元件,对一个或多个输入执行布尔运算,并产生单一输出。每个门都有特定的符号和一个真值表,真值表列出所有可能的输入组合及对应的输出。

In the IGCSE syllabus, you need to know the behaviour of the following gates: NOT, AND, OR, NAND, NOR, and XOR. Truth tables are the most reliable way to describe the behaviour of these gates, and you will often be asked to complete or draw them in exams.

在 IGCSE 考纲中,你需要掌握以下门的行为:NOT 门、AND 门、OR 门、NAND 门、NOR 门和 XOR 门。真值表是描述这些门行为最可靠的方式,考试中经常会要求你补全或画出真值表。


3. The NOT Gate (Inverter) | NOT 门(反相器)

The NOT gate has one input and one output. It simply inverts the input: if the input is 1, the output is 0; if the input is 0, the output is 1. The NOT gate is also called an inverter.

NOT 门有一个输入和一个输出。它简单地反转输入:如果输入为 1,输出为 0;如果输入为 0,输出为 1。NOT 门也称为反相器。

Input A Output X = NOT A
0 1
1 0

Its Boolean expression is written as X = Ā or X = NOT A. In a circuit diagram, the NOT gate symbol is a triangle with a small circle at the tip.

其布尔表达式写作 X = Ā 或 X = NOT A。在电路图中,NOT 门符号是一个三角形,尖端带一个小圆圈。


4. The AND Gate | AND 门

The AND gate has two (or more) inputs and one output. The output is 1 only when all inputs are 1. In other words, the output is 0 if any input is 0.

AND 门有两个(或更多)输入和一个输出。只有当所有输入都为 1 时,输出才为 1。换句话说,只要任意一个输入为 0,输出就为 0。

Input A Input B Output X = A AND B
0 0 0
0 1 0
1 0 0
1 1 1

Its Boolean expression is written as X = A · B or X = AB (read as “A and B”). In some textbooks, you may also see X = A ∧ B. The AND gate is often used when two conditions must both be true for an action to occur.

其布尔表达式写作 X = A · B 或 X = AB(读作“A 与 B”)。有些教科书也写作 X = A ∧ B。AND 门常用于需要两个条件同时为真才能触发某个动作的场合。


5. The OR Gate | OR 门

The OR gate has two (or more) inputs and one output. The output is 1 if at least one input is 1. The output is 0 only when all inputs are 0.

OR 门有两个(或更多)输入和一个输出。只要至少一个输入为 1,输出就为 1。只有所有输入都为 0 时,输出才为 0。

Input A Input B Output X = A OR B
0 0 0
0 1 1
1 0 1
1 1 1

Its Boolean expression is written as X = A + B (read as “A or B”). Some textbooks write X = A ∨ B. The OR gate is used when an action should occur if at least one of several conditions is true.

其布尔表达式写作 X = A + B(读作“A 或 B”)。有些教科书写作 X = A ∨ B。OR 门用于当几个条件中至少一个为真时就应该发生某个动作的场合。


6. The NAND Gate | NAND 门

The NAND gate is the combination of an AND gate followed by a NOT gate. Its output is the exact opposite of the AND gate: it outputs 0 only when all inputs are 1, and outputs 1 in all other cases.

NAND 门是 AND 门后面接一个 NOT 门的组合。它的输出与 AND 门完全相反:只有当所有输入都为 1 时输出才为 0,其他所有情况下输出均为 1。

Input A Input B Output X = A NAND B
0 0 1
0 1 1
1 0 1
1 1 0

Its Boolean expression is written as X = A · B. The NAND gate is known as a “universal gate” because you can build any other logic gate using only NAND gates.

其布尔表达式写作 X = A · B。NAND 门被称为“通用门”,因为仅用 NAND 门就可以构建任何其他逻辑门。


7. The NOR Gate | NOR 门

The NOR gate is the combination of an OR gate followed by a NOT gate. Its output is the exact opposite of the OR gate: it outputs 1 only when all inputs are 0, and outputs 0 in all other cases.

NOR 门是 OR 门后面接一个 NOT 门的组合。它的输出与 OR 门完全相反:只有当所有输入都为 0 时输出才为 1,其他所有情况下输出均为 0。

Input A Input B Output X = A NOR B
0 0 1
0 1 0
1 0 0
1 1 0

Its Boolean expression is written as X = A + B. Like NAND, NOR is also a universal gate, meaning any logic circuit can be constructed using only NOR gates.

其布尔表达式写作 X = A + B。与 NAND 一样,NOR 也是通用门,意味着任何逻辑电路都可以仅用 NOR 门来构建。


8. The XOR Gate | XOR 门(异或门)

The XOR (exclusive OR) gate has two inputs and one output. The output is 1 when the inputs are different (one is 0 and the other is 1). The output is 0 when the inputs are the same (both 0 or both 1).

XOR(异或)门有两个输入和一个输出。当输入不同时(一个为 0,另一个为 1),输出为 1。当输入相同时(两个都为 0 或两个都为 1),输出为 0。

Input A Input B Output X = A XOR B
0 0 0
0 1 1
1 0 1
1 1 0

Its Boolean expression is written as X = A ⊕ B. XOR gates are particularly important in arithmetic circuits, especially in adders that perform binary addition.

其布尔表达式写作 X = A ⊕ B。XOR 门在算术电路中特别重要,尤其是在执行二进制加法的加法器中。


9. Logic Circuits and Combined Gates | 逻辑电路与组合门

In real-world systems, multiple logic gates are combined to form a logic circuit. Each gate’s output becomes the input for another gate. To find the final output of such a circuit, you work step by step from the inputs towards the output, evaluating each gate using its truth table.

在现实系统中,多个逻辑门组合在一起形成逻辑电路。每个门的输出成为下一个门的输入。要找到这样一个电路的最终输出,你需要从输入开始逐步走向输出,用真值表计算每个门的结果。

For example, consider a circuit where A and B go into an AND gate, and the output of that AND gate goes into an OR gate together with input C. The final expression is X = (A AND B) OR C, which can be written as X = A·B + C.

例如,考虑一个电路:A 和 B 进入一个 AND 门,该 AND 门的输出与输入 C 一起进入一个 OR 门。最终表达式为 X = (A AND B) OR C,写作 X = A·B + C。

When analysing circuits, always follow this strategy: label intermediate outputs, write down the expression at each point, then construct the full truth table from left to right.

分析电路时,始终遵循这个策略:标出中间输出,记下每个点的表达式,然后从左到右构建完整的真值表。


10. Writing Boolean Expressions from Circuits | 从电路写出布尔表达式

You may be given a logic circuit and asked to write its Boolean expression. The key is to identify each gate in order and combine the expressions according to the connections.

你可能会拿到一个逻辑电路,要求写出它的布尔表达式。关键在于按顺序识别每个门,并根据连接方式组合表达式。

Here is a systematic method:

这里有一个系统化方法:

  • Label the inputs with letters such as A, B, C.

    用字母如 A、B、C 标记输入。

  • Starting from the input side, find the first gate. Write its output expression (e.g., A·B for an AND gate with inputs A and B).

    从输入一侧开始,找到第一个门。写出它的输出表达式(例如,输入为 A 和 B 的 AND 门写作 A·B)。

  • Follow the signal flow. Combine intermediate expressions using the appropriate operators. Remember that NOT bars invert whatever expression they cover.

    跟随信号流向。用相应的运算符组合中间表达式。记住,反相线(上划线)会反转其覆盖的整个表达式。

Practice this method with many past-paper questions. Drawing a clear circuit diagram and annotating each intermediate output is the key to avoiding mistakes.

用大量往年真题练习这个方法。画出清晰的电路图并标注每个中间输出,是避免错误的关键。


11. Drawing Circuits from Boolean Expressions | 根据布尔表达式画电路

Sometimes the question gives you a Boolean expression and asks you to draw the corresponding logic circuit. The process is the reverse of writing expressions.

有时题目给你一个布尔表达式,要求你画出对应的逻辑电路。这个过程与写表达式相反。

Here is a step-by-step approach:

这里是一个分步方法:

  • Identify the main operator (the last operation performed). This becomes the final gate in the circuit.

    识别主运算符(最后执行的操作)。这将成为电路中的最终门。

  • Break the expression into sub-expressions on each side of the main operator. For example, in X = A·B + C, the main operator is OR. The two sub-expressions are A·B and C.

    将表达式拆分为主运算符两侧的子表达式。例如,在 X = A·B + C 中,主运算符是 OR。两个子表达式是 A·B 和 C。

  • Draw the sub-circuits for each sub-expression, then feed their outputs into the final gate.

    为每个子表达式画出子电路,然后把它们的输出接入最终门。

This “top-down” method works for most IGCSE-level expressions. Always label inputs clearly and use the correct logic gate symbols.

这种“自顶向下”的方法适用于大多数 IGCSE 水平的表达式。始终清晰标记输入,并采用正确的逻辑门符号。


12. Applications of Boolean Logic | 布尔逻辑的应用

Boolean logic is everywhere. In your daily life, a washing machine uses logic gates to decide when to spin based on water level and door closure signals. A home security alarm uses AND gates to ensure both the sensor and the timer conditions are met.

布尔逻辑无处不在。在日常生活中,洗衣机使用逻辑门根据水位和门闭合信号来决定何时脱水。家庭安防警报使用 AND 门来确保传感器和定时器条件同时满足。

In computing, the ALU (Arithmetic Logic Unit) of a CPU uses combinations of AND, OR, and XOR gates to perform addition, subtraction, and comparisons. Even your smartphone’s touchscreen uses logic circuits to determine which finger position to register.

在计算领域,CPU 中的 ALU(算术逻辑单元)使用 AND、OR 和 XOR 门的组合来执行加、减和比较操作。甚至智能手机的触摸屏也使用逻辑电路来确定应识别哪根手指的位置。

Beyond computing, Boolean logic is used in search engines: when you search for “cats AND dogs”, the search engine uses a logical AND operation to find web pages that contain both terms. This direct connection between logic and daily life makes Boolean logic one of the most relevant topics in the IGCSE syllabus.

除了计算,布尔逻辑还用于搜索引擎:当你搜索“cats AND dogs”时,搜索引擎使用逻辑与操作来查找同时包含这两个词的网页。这种逻辑与日常生活的直接联系,使布尔逻辑成为 IGCSE 考纲中最实用的主题之一。


Boolean logic can be challenging at first because it requires a precise, step-by-step way of thinking. The best way to master it is to practice: draw the circuits, complete the truth tables, and always double-check each gate’s output. With a solid understanding of NOT, AND, OR, NAND, NOR, and XOR gates, you will be well prepared for any Boolean logic question in your exam.

布尔逻辑一开始可能很有挑战性,因为它需要精确、一步步的思维方式。掌握它的最好方法就是练习:画电路、补全真值表,并始终仔细检查每个门的输出。牢固掌握 NOT、AND、OR、NAND、NOR 和 XOR 门之后,你就能从容应对考试中的任何布尔逻辑题目。

Published by TutorHao | Science Revision Series | aleveler.com

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

Comments

屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from aleveler.com

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version