📚 IGCSE Computer Science: Boolean Logic Basics | IGCSE计算机:布尔逻辑基础
In the digital world, everything revolves around two states: 0 and 1. Boolean logic is the system of rules that allows computers to make decisions based on these binary values. It is the foundation of all digital circuits, from the simplest calculator to the most advanced AI processor.
在数字世界中,一切都围绕两种状态运转:0 和 1。布尔逻辑是一套规则系统,它使计算机能够基于这些二进制值做出决策。它是所有数字电路的基础,从最简单的计算器到最先进的人工智能处理器都离不开它。
1. What is Boolean Logic? | 什么是布尔逻辑?
Boolean logic is a branch of algebra where all values are either TRUE (1) or FALSE (0). In computer systems, these binary values correspond to high and low electrical voltages. By using logic to combine these values, computers can execute instructions, process data, and make decisions.
布尔逻辑是代数学的一个分支,其中所有值要么为真(1),要么为假(0)。在计算机系统中,这些二进制值对应着高电平和低电平的电压。通过使用逻辑组合这些值,计算机可以执行指令、处理数据并做出决策。
Unlike normal arithmetic, where numbers can have many different values, boolean logic simplifies everything to a simple 'yes' or 'no'. This simplicity is what makes digital computers so reliable and scalable. Every action a computer takes is ultimately broken down into a series of boolean operations.
与普通算术中数字可以有多种不同取值不同,布尔逻辑将一切都简化为简单的"是"或"否"。这种简洁性正是数字计算机如此可靠且易于扩展的原因。计算机执行的每一个操作,最终都会分解为一系列布尔运算。
TRUE = 1 = HIGH Voltage
FALSE = 0 = LOW Voltage
2. Logic Gates and Truth Tables | 逻辑门与真值表
A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment, each input and output is in one of two possible states: HIGH (1) or LOW (0). The relationship between the inputs and the output of a logic gate is summarised in a truth table.
逻辑门是数字电路的基本构建单元。大多数逻辑门有两个输入和一个输出。在任意给定时刻,每个输入和输出都处于两种可能状态之一:高电平(1)或低电平(0)。逻辑门输入与输出之间的关系通过真值表来总结。
The number of rows in a full truth table is calculated as 2ⁿ, where n is the number of inputs. For example, a single-input gate has 2 rows, a two-input gate has 4 rows, and a three-input gate has 8 rows. In the CIE IGCSE examination, you will often have to complete truth tables for circuits with 2 or 3 inputs.
完整真值表的行数计算方式为 2ⁿ,其中 n 是输入的个数。例如,单输入门有 2 行,双输入门有 4 行,三输入门有 8 行。在 CIE IGCSE 考试中,你经常需要完成包含 2 个或 3 个输入的电路的真值表。
3. The AND Gate | 与门
The AND gate outputs 1 only if all of its inputs are 1. In Boolean algebra, this is written as A·B or AB. Think of it like a series circuit: current only flows when both switches are closed. If either input is 0, the output is immediately 0.
与门仅当其所有输入均为 1 时,输出才为 1。在布尔代数中,这写作 A·B 或 AB。可以把它想象成串联电路:只有当两个开关都闭合时,电流才会流动。只要任何一个输入为 0,输出立刻为 0。
Output = A · B
| Input A | Input B | Output (A AND B) |
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The standard symbol for an AND gate is a D-shaped symbol with two inputs on the left and one output on the right. When drawing circuits, always label the inputs clearly.
与门的标准符号是一个 D 形符号,左侧有两个输入,右侧有一个输出。在绘制电路时,务必清晰标记输入。
4. The OR Gate | 或门
The OR gate outputs 1 if at least one ake care not to confuse this with normal arithmetic addition; in boolean logic, 1 + 1 = 1.
或门只要至少一个输入为 1,输出就为 1。在布尔代数中,这写作 A+B。可以把它想象成并联电路:只要有任何一个开关闭合,电流就会流动。注意不要将其与普通算术加法混淆;在布尔逻辑中,1 + 1 = 1。
Output = A + B
| Input A | Input B | Output (A OR B) |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The standard symbol for an OR gate is similar to the AND gate but has a curved, shield-like body instead of a straight D-shape.
或门的标准符号与与门类似,但其主体是弯曲的盾牌状,而不是笔直的 D 形。
5. The NOT Gate | 非门
The NOT gate, also known as an inverter, takes a single input and reverses it. If the input is 1, the output is 0, and vice versa. In Boolean algebra, this is written as ¬A or A'. This is a fundamental building block for making other gates, like NAND and NOR.
非门,也称为反相器,接收单个输入并将其反转。如果输入是 1,输出就是 0,反之亦然。在布尔代数中,这写作 ¬A 或 A'。这是构建其他门(如与非门和或非门)的基本构件。
Output = ¬A
| Input A | Output (NOT A) |
| 0 | 1 |
| 1 | 0 |
The standard symbol for a NOT gate is a triangle followed by a small
Published by TutorHao | IGCSE Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图