Boolean Algebra for IGCSE WJEC Computer Science | IGCSE WJEC 计算机:布尔代数 考点精讲

📚 Boolean Algebra for IGCSE WJEC Computer Science | IGCSE WJEC 计算机:布尔代数 考点精讲

Boolean algebra forms the backbone of digital logic and is a key topic in the WJEC IGCSE Computer Science specification. Understanding how to manipulate binary variables using logical operators is essential for designing and simplifying circuits, writing efficient code, and solving real‑world computing problems. This revision guide breaks down everything you need to know – from basic gates to De Morgan’s laws – with clear explanations, truth tables, and step‑by‑step simplification techniques.

布尔代数是数字逻辑的基础,也是 WJEC IGCSE 计算机科学课程中的核心考点。掌握如何使用逻辑运算符处理二进制变量,对于设计简化电路、编写高效代码以及解决实际计算问题至关重要。本文逐一剖析你需要掌握的全部内容——从基本门电路到德摩根定律——配有清晰的解释、真值表和循序渐进的化简方法。


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

Boolean logic is a branch of algebra where variables can only take one of two values: 0 (false) or 1 (true). It was named after mathematician George Boole and is used in computer systems to represent and process binary information. Every digital circuit, from a simple calculator to a complex processor, relies on Boolean operations to make decisions.

布尔逻辑是代数的一个分支,其变量只能取两种值:0(假)或 1(真)。它以数学家乔治·布尔的名字命名,在计算机系统中用于表示和处理二进制信息。从简单的计算器到复杂的处理器,每个数字电路都依赖布尔运算来做决策。

In the WJEC IGCSE exam, you will be expected to work with Boolean expressions, truth tables, and logic circuits. The three fundamental operators are AND, OR, and NOT. You will also encounter derived gates such as NAND, NOR, and XOR. Being able to translate between these representations and simplify logic is a skill that is tested regularly.

在 WJEC IGCSE 考试中,你需要熟练掌握布尔表达式、真值表和逻辑电路。三个基本运算符是 AND、OR 和 NOT。你还将遇到由基本门导出的与非门(NAND)、或非门(NOR)和异或门(XOR)。能够在这几种表示方法之间互相转换并进行化简,是一项经常被考查的技能。


2. Basic Logic Gates and Their Symbols | 基本逻辑门及其符号

A logic gate is a physical device that implements a Boolean function. Each gate has a distinct symbol, function, and truth table. You must memorise the standard symbols for the WJEC exam. The table below summarises the six gates you need to know.

逻辑门是实现布尔函数的物理设备。每种门都有独特的符号、功能和真值表。你必须为 WJEC 考试熟记标准符号。下表总结了你需要掌握的六种逻辑门。

Gate Symbol (Function) Boolean Expression Description
AND D‑shape Q = A ⋅ B Output is 1 only if both inputs are 1
OR Curved shape Q = A + B Output is 1 if at least one input is 1
NOT Triangle with a circle Q = A’ (or ¬A) Output is the inverse of the input
NAND AND followed by a circle Q = (A ⋅ B)’ Opposite of AND
NOR OR followed by a circle Q = (A + B)’ Opposite of OR
XOR OR with an extra curved line Q = A ⊕ B Output is 1 only if inputs are different

Notice how NAND and NOR are universal gates: you can construct any other gate using only NAND gates, or only NOR gates. This property often appears in extension questions.

注意,与非门和或非门是通用门:你可以仅用与非门或仅用或非门构建其它任何门电路。这一性质经常出现在拓展题中。


3. Constructing Truth Tables | 构建真值表

A truth table lists every possible combination of inputs and shows the corresponding output for a logic circuit or Boolean expression. For n input variables, the table will contain 2ⁿ rows. You should be able to produce a truth table from a given expression or circuit diagram, and also work backwards from a truth table to derive an expression.

真值表列出了所有可能的输入组合,并给出逻辑电路或布尔表达式的对应输出。对于 n 个输入变量,真值表包含 2ⁿ 行。你应当能够根据给定的表达式或电路图绘制真值表,也能够从真值表反向推导出逻辑表达式。

For example, consider the expression Q = (A ⋅ B) + C. The truth table has 2³ = 8 rows:

例如,考虑表达式 Q = (A ⋅ B) + C,其真值表有 8 行:

A B C A ⋅ B Q = (A ⋅ B) + 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

In the exam, always label intermediate columns to show your working. This helps avoid mistakes and ensures you get part marks even if the final output column contains an error.

考试中,务必标注中间运算列以展示你的步骤。这有助于避免错误,并且即使最终输出列有误,也能获得部分分数。


4. Writing and Interpreting Boolean Expressions | 书写与解读布尔表达式

A Boolean expression describes the logical relationship between inputs and outputs using operators. For WJEC, you will write expressions using AND (⋅), OR (+), and NOT ( ‘ or overbar). Brackets indicate order of operations, just like in ordinary algebra. For instance, (A + B) ⋅ C means OR is performed first, then AND with C.

布尔表达式使用运算符描述输入与输出之间的逻辑关系。在 WJEC 考试中,你将用 AND(⋅)、OR(+)和 NOT(’ 或上划线)书写表达式。括号表明运算顺序,就像普通代数一样。例如,(A + B) ⋅ C 表示先进行 OR 运算,再与 C 做 AND 运算。

Sometimes you will need to read an expression and draw the corresponding circuit. The order of gates follows the order of operations: NOT gates are applied first, then AND gates (unless overridden by brackets), and finally OR gates. Remembering this hierarchy will help you construct diagrams correctly.

有时你需要读取表达式并画出相应的电路图。门电路的顺序遵循运算优先级:NOT 门最先应用,然后是 AND 门(除非括号改变了优先级),最后是 OR 门。牢记这一层级关系能帮助你正确构建电路图。


5. Converting Between Logic Circuits and Expressions | 逻辑电路与表达式的相互转换

A key skill tested in the exam is translating a combinational logic circuit into a Boolean expression and vice versa. Start by identifying the inputs and working through the circuit gate by gate, writing the output of each gate as an intermediate expression. Then combine these to form the final expression.

考试中考查的一项关键技能是在组合逻辑电路与布尔表达式之间互相转换。首先,识别出输入端,然后逐个门地在该电路中推进,将每个门的输出写成一个中间表达式。最后把这些表达式合并,就得到了最终的布尔表达式。

For conversion from expression to circuit, draw the gates in the order prescribed by the operators and brackets. Begin with NOT gates for any inverted variables, then AND gates for products, and join these with OR gates for sums. Use a couple of example expressions to practise both directions until it becomes second nature.

从表达式转换为电路时,按运算符和括号规定的顺序画出门电路。先为所有被取反的变量画出 NOT 门,然后为乘积项画出 AND 门,最后用 OR 门把这些部分连接起来。用几个示例表达式反复练习两个方向的转换,直到得心应手为止。

Example: expression Q = (A’ ⋅ B) + (A ⋅ B’) → circuit

示例:表达式 Q = (A’ ⋅ B) + (A ⋅ B’) → 电路

Here you have two AND gates: one with inputs A’ and B, the other with A and B’. Their outputs feed into an OR gate to give Q. Notice how brackets define the grouping.

此处你需要两个 AND 门:一个输入端为 A’ 和 B,另一个为 A 和 B’。它们的输出共同输入到一个 OR 门以产生 Q。注意括号是如何定义分组关系的。


6. Boolean Laws – Fundamental Identities | 布尔定律——基本恒等式

To simplify Boolean expressions and circuits, you need to apply a set of laws. The most important foundational rules are listed below. You are expected to know and be able to use these without a reference in the exam.

为了化简布尔表达式和电路,你需要应用一组定律。下面列出了最基本也是最重要的规则。考试中要求你熟记并能够直接运用它们,不允许查阅资料。

  • Commutation: A + B = B + A ; A ⋅ B = B ⋅ A

交换律:A + B = B + A ; A ⋅ B = B ⋅ A

  • Association: (A + B) + C = A + (B + C) ; (A ⋅ B) ⋅ C = A ⋅ (B ⋅ C)

结合律:(A + B) + C = A + (B + C) ; (A ⋅ B) ⋅ C = A ⋅ (B ⋅ C)

  • Distribution: A ⋅ (B + C) = (A ⋅ B) + (A ⋅ C) ; A + (B ⋅ C) = (A + B) ⋅ (A + C)

分配律:A ⋅ (B + C) = (A ⋅ B) + (A ⋅ C) ; A + (B ⋅ C) = (A + B) ⋅ (A + C)

  • Identity: A + 0 = A ; A ⋅ 1 = A

恒等律:A + 0 = A ; A ⋅ 1 = A

  • Complement: A + A’ = 1 ; A ⋅ A’ = 0

互补律:A + A’ = 1 ; A ⋅ A’ = 0

  • Idempotence: A + A = A ; A ⋅ A = A

幂等律:A + A = A ; A ⋅ A = A

  • Absorption: A + (A ⋅ B) = A ; A ⋅ (A + B) = A

吸收律:A + (A ⋅ B) = A ; A ⋅ (A + B) = A

These laws allow you to reorganise and reduce expressions without changing their logical function. Always justify each step by mentioning the law you are applying – this is often required for full marks.

这些定律可以在不改变逻辑功能的前提下重组并简化表达式。每一步化简都要注明你所应用的定律名称——这在考试中往往是获得满分的要求。


7. De Morgan’s Laws and Other Useful Rules | 德摩根定律及其他实用规则

De Morgan’s laws are especially powerful for converting between AND/OR/NAND/NOR forms and for simplifying expressions that contain negation over a bracket. They state:

德摩根定律在 AND/OR/NAND/NOR 形式之间转换,以及化简带有括号取反的表达式时尤为强大。它们表述为:

(A ⋅ B)’ = A’ + B’

(A ⋅ B)’ = A’ + B’

(A + B)’ = A’ ⋅ B’

(A + B)’ = A’ ⋅ B’

In words, the negation of an AND expression becomes the OR of the negated inputs; the negation of an OR expression becomes the AND of the negated inputs. You will often use these to break a complex negation into simpler terms.

换言之,AND 表达式的取反变为各输入取反后的 OR;OR 表达式的取反变为各输入取反后的 AND。你经常会利用它们将复杂的取反分解为更简单的项。

Additionally, the double negation rule A” = A is useful for rewinding an inverted signal. The law of the ‘bubble match’ (bubbles cancel) is a visual way to apply De Morgan’s laws in circuit diagrams.

此外,双重反演律 A” = A 也是将反相信号还原的实用规则。“泡泡匹配”法则(泡泡相互抵消)是在电路图中应用德摩根定律的一种直观方法。


8. Simplifying Boolean Expressions Step by Step | 一步一步化简布尔表达式

Exam questions frequently ask you to simplify a Boolean expression using algebraic laws. Let’s walk through a typical example.

考题常常要求你使用代数定律化简布尔表达式。我们来一步步完成一个典型例子。

Simplify: Q = A’B + AB + A’B’

化简:Q = A’B + AB + A’B’

Step 1: Group the first two terms and factor out B. Q = B(A’ + A) + A’B’.

第 1 步:将前两项分组并提取公因子 B。Q = B(A’ + A) + A’B’。

Step 2: Apply complement law A’ + A = 1. Q = B ⋅ 1 + A’B’ = B + A’B’.

第 2 步:应用互补律 A’ + A = 1。Q = B ⋅ 1 + A’B’ = B + A’B’。

Step 3: Use the absorption variant (or distribution) to further simplify. A’B’ + B can be re‑written as B + A’ (since anything ORed with a true B covers the B’ terms). Indeed, B + A’B’ = B + A’.

第 3 步:利用吸收律变体(或分配律)进一步化简。A’B’ + B 可重写为 B + A’(因为任何与为真的 B 做 OR 运算都能覆盖 B’ 的项)。实际上,B + A’B’ = B + A’。

Verification: construct a truth table for the original and final expressions to confirm they match. This practice is strongly recommended in the exam to catch any algebraic slip.

验证:为原表达式和最终表达式分别构建真值表,确认输出一致。强烈建议在考试中养成此习惯,以发现任何代数错误。


9. Simplifying Logic Circuits | 简化逻辑电路

Once you have a simplified Boolean expression, you can redraw the logic circuit using fewer gates. Reducing gate count saves cost, power, and physical space in real circuits. In the exam, you may be asked to draw the simplified circuit or to compare the original and simplified versions.

一旦得到了化简后的布尔表达式,你就可以用更少的门重新绘制逻辑电路。减少门数在实际电路中能降低成本、功耗和物理空间。考试可能要求你画出简化后的电路,或比较原电路与简化版本。

Consider the original circuit for Q = A’B + AB + A’B’, which would need three AND gates and one three‑input OR gate (plus inverters). After simplification to Q = B + A’, it becomes just one OR gate and one inverter. That is a dramatic improvement. Always label the final diagram clearly with the expression.

考虑 Q = A’B + AB + A’B’ 的原电路,它需要三个 AND 门、一个三输入 OR 门,外加反相器。化简为 Q = B + A’ 后,仅需要一个 OR 门和一个反相器。这是巨大的改进。务必在最终电路图旁标注出对应表达式。


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

Many marks are lost through careless errors that are easy to avoid. Here are some essential tips for the Boolean algebra section of the WJEC IGCSE Computer Science exam.

许多丢分是由于可以轻易避免的粗心错误造成的。以下是为 WJEC IGCSE 计算机科学考试布尔代数部分准备的一些重要技巧。

  • Always draw truth tables with rows in binary counting order (000, 001, 010, …). This ensures no combination is missed.

始终按二进制计数顺序(000,001,010,……)排列真值表的行,确保没有遗漏任何组合。

  • When simplifying, write the law you are using next to each step. Even if the final answer is wrong, you can earn method marks.

进行化简时,在每一步旁边写出你所使用的定律名称。即使最终答案错误,你仍能获得方法分。

  • Double‑check that you have correctly applied De Morgan’s laws, especially the change from AND to OR (and vice versa) and the individual negation of each variable.

反复检查德摩根定律的应用是否正确,尤其要注意 AND 变 OR(反之亦然)以及每个变量的单独取反。

  • Be careful with bracket placement. Forgetting a pair of brackets can completely alter the logic.

留心括号的位置。少写一对括号可能彻底改变逻辑含义。

  • Use intermediate columns in truth tables to reduce mental arithmetic mistakes. Even simple combinations such as A ⋅ B deserve their own column.

在真值表中使用中间列以减少心算错误。即使是 A ⋅ B 这样简单的组合,也值得单独列出来。

  • Practise drawing circuits neatly. Crossings and unclear connections can cost you marks. Use a pencil and ruler during the exam.

练习画整洁的电路图。交叉线和模糊的连线可能导致失分。考试时使用铅笔和直尺绘图。

With consistent practice, Boolean algebra becomes one of the most predictable and rewarding parts of the paper. Master the laws, truth tables, and conversions, and you will face the exam with confidence.

通过反复练习,布尔代数会成为试卷中最具可预测性和得分回报的部分。掌握定律、真值表和转换方法,你便能自信应对考试。


Published by TutorHao | Computer 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