| Candidates should be able to: | Notes and guidance |
|---|---|
| 1 Identify and use the standard symbols for logic gates | • See section 4 for logic gate symbols |
| 2 Define and understand the functions of logic gates | • Including: – NOT – AND – OR – NAND – NOR – XOR (EOR) – the binary output produced from all the possible binary inputs • NOT is a single input gate • All other gates are limited to two inputs |
| 3 (a) Use logic gates to create given logic circuits from a: (i) problem statement (ii) logic expression (iii) truth table (b) Complete a truth table from a: (i) problem statement (ii) logic expression (iii) logic circuit | • Circuits must be drawn for the statement given, without simplification • Logic circuits will be limited to a maximum of three inputs and one output • An example truth table with three inputs, for completion: A B C Output | 0 0 0 | 0 0 1 | 0 1 0 | 0 1 1 | 1 0 0 | 1 0 1 | 1 1 0 | 1 1 1 |
| (c) Write a logic expression from a: (i) problem statement (ii) logic circuit (iii) truth table |
布尔逻辑
IGCSE 计算机科学 · 第 10 主题
8:37
Boolean Logic
Look closely at this chip. There is nothing clever inside it. It cannot think. Inside are millions of tiny switches, and each switch can only be one of two…
英文讲解 · 内嵌中英文字幕
大纲
来源:剑桥国际大纲
10.1
什么是布尔逻辑?
布尔逻辑(Boolean logic)用真或假的值工作。在电子学中这些被显示为 1(真)和 0(假)。一个逻辑门(logic gate)取一个或多个这些输入并给一个输出,遵循一个固定的规则。
一个真值表(truth table)列出每一个可能的输入集及每个的输出。你通过写出所有的输入组合来构建它。

| 英文 | 中文 | 拼音 |
|---|---|---|
| Boolean logic | 布尔逻辑 | bù ěr luó jí |
| logic gate | 逻辑门 | luó jí mén |
| truth table | 真值表 | zhēn zhí biǎo |
10.2
六种逻辑门
你必须知道六个门。NOT 有一个输入;其他所有的有两个输入(A 和 B)。


NOT gate
非门(NOT gate)反转输入。当输入是 0 时输出是 1。
| A | Output |
|---|---|
| 0 | 1 |
| 1 | 0 |
AND gate
与门(AND gate)只在两个输入都是 1 时给输出 1。

| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR gate
或门(OR gate)在至少一个输入是 1 时给输出 1。

| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NAND gate
与非门(NAND gate)是 AND 后跟 NOT。输出是 AND 的相反。
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR gate
或非门(NOR gate)是 OR 后跟 NOT。输出是 OR 的相反。
| A | B | Output |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
XOR gate
异或门(XOR gate,异或)在输入不同时给输出 1。
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The logic gates
Switch the inputs and pick a gate to see its output — AND, OR, NOT, NAND, NOR, XOR.
| 英文 | 中文 | 拼音 |
|---|---|---|
| NOT gate | 非门 | fēi mén |
| AND gate | 与门 | yǔ mén |
| OR gate | 或门 | huò mén |
| NAND gate | 与非门 | yǔ fēi mén |
| NOR gate | 或非门 | huò fēi mén |
| XOR gate | 异或门 | yì huò mén |
10.3
逻辑表达式
一个逻辑表达式(logic expression)用字母和门的词书写一个电路。书写门的通常方式:
| 门 | 用词 |
|---|---|
| NOT A | NOT A |
| A AND B | A AND B |
| A OR B | A OR B |
例如,表达式 (A AND B) OR (NOT C) 意味着:做 A AND B、做 NOT C,然后把两个结果 OR 在一起。

Truth tables
Build the truth table for AND, OR, XOR and NOT — the logic behind every expression.
| 英文 | 中文 | 拼音 |
|---|---|---|
| logic expression | 逻辑表达式 | luó jí biǎo dá shì |
10.4
逻辑电路
一个逻辑电路(logic circuit)把门连接在一起以执行一个任务。一个门的输出能变成另一个的输入。在 IGCSE,一个电路有多达三个输入和一个输出。

你必须能在四种形式之间移动:
- 一个问题陈述(problem statement,一个用词的描述),
- 一个逻辑表达式,
- 一个逻辑电路,
- 一个真值表。
From a problem statement to a circuit
读陈述并挑出条件和逻辑词(and、or、not)。例如:
一个警报(X)在门开着(A)AND 系统被打开(B)时响起。
这是 X = A AND B,所以你画一个 AND 门,带输入 A 和 B。
Completing a truth table from a circuit or expression
要填一个真值表:
- 写所有输入组合。对三个输入有 8 行(000 到 111)。
- 按顺序算出每个门的输出,一次一列。
- 最后一列是最终输出。

| A | B | C | A AND B | (A AND B) OR C |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 1 |
为每个门加一个中间的"工作"列使最终输出容易填。总是精确地按陈述所说画电路,不简化它。
例题。 对 X = (A AND B) OR (NOT C),完成 A = 1、B = 0、C = 0 这一行的真值表。从括号往外做,一次算一个门。首先 A AND B = 1 AND 0 = 0,因为 AND 要求两个输入都是 1。接着 NOT C = NOT 0 = 1。最后把两个结果做 OR:0 OR 1 = 1。所以 X = 1。要给每个中间的门单独一列,而不是想一步算完整个表达式:三个输入意味着有 $2^3 = 8$ 行,而这些中间列正是即使最终答案算错也能拿到方法分的地方。
| 英文 | 中文 | 拼音 |
|---|---|---|
| logic circuit | 逻辑电路 | luó jí diàn lù |
| problem statement | 问题陈述 | wèn tí chén shù |
10.5
考试技巧
- 学习所有六个门及它们的真值表:NOT、AND、OR、NAND(NOT AND)、NOR(NOT OR)、XOR(在输入不同时输出 1)。
- 用所有输入行构建一个真值表(2 个输入 → 4 行,3 个输入 → 8),以二进制往上数,并为每个门加一个工作列。
- 通过挑出 AND / OR / NOT 词把一个问题陈述变成一个逻辑表达式,然后精确地按书写画它——不要简化它。
- NAND 和 NOR 给出与 AND 和 OR 相反的输出;一个门输出上的一个小圆圈意味着结果被反转。
本主题的互动课程
逐步学习,并即时检测练习。