📚 A-Level AQA Computer Science: Boolean Algebra Core Concepts | A-Level AQA 计算机:布尔代数 考点精讲
Boolean algebra provides the mathematical backbone of digital logic. In AQA A-Level Computer Science, you are expected to manipulate logical expressions, simplify circuits and apply laws such as De Morgan’s theorems with confidence. This article revisits every essential point, from truth tables to Karnaugh maps, using the notation and conventions required in the exam.
布尔代数是数字逻辑的数学基础。在 AQA A-Level 计算机科学考试中,你需要熟练地操作逻辑表达式、化简电路并应用德摩根定律等。本文将从真值表到卡诺图,使用考试规定的符号逐一梳理所有重要考点。
1. Boolean Variables and Basic Operators | 布尔变量与基本运算符
A Boolean variable can only take the value 0 (False) or 1 (True). The three primary operators are AND (conjunction), OR (disjunction) and NOT (negation). In AQA notation, AND is often written as a dot ' . ', OR as a plus ' + ' and NOT as an overbar or the ¬ symbol, e.g. ¬A or A̅. XOR is represented by the symbol ⊕.
布尔变量只能取 0(假)或 1(真)。三个基本运算符是 AND(与)、OR(或)和 NOT(非)。在 AQA 符号体系中,AND 通常写作 ' . ',OR 写作 ' + ',NOT 写为上划线或符号 ¬,例如 ¬A 或 A̅。异或用 ⊕ 表示。
The order of precedence when evaluating expressions is: brackets first, then NOT, then AND, then OR. XOR has lower precedence than AND and OR. Always use brackets to avoid ambiguity.
表达式求值的优先级顺序是:括号优先,其次是 NOT,然后是 AND,最后是 OR。XOR 的优先级低于 AND 和 OR。为避免歧义,务必使用括号。
2. Truth Tables and Gate Symbols | 真值表与门电路符号
A truth table lists every possible input combination and the corresponding output. For two inputs A and B there are 4 rows; for three inputs 8 rows. The exam expects you to draw and interpret truth tables for basic gates and combinations.
真值表列出所有可能的输入组合及其对应的输出。两个输入 A 和 B 有 4 行;三个输入有 8 行。考试要求你能够绘制并解释基本门电路及其组合的真值表。
| A | B | A . B | A + B | A ⊕ B |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 |
Recognise the corresponding gate symbols used in AQA diagrams: a flat-ended AND gate, a curved OR gate, a triangle with a bubble for NOT, and an OR gate with an extra curved line for XOR. The NAND and NOR gates are simply AND/OR followed by a bubble.
熟悉 AQA 电路图中使用的门电路符号:平底边的 AND 门、弧形底的 OR 门、带小圆圈的三角形 NOT 门,以及 OR 门外加一条弧线的 XOR 门。NAND 和 NOR 门就是在 AND/OR 门输出端加上小圆圈。
3. Fundamental Laws of Boolean Algebra | 布尔代数的基本定律
You must be able to apply the following laws without hesitation. They are the tools for simplifying complex circuits and are explicitly tested.
你必须能够熟练运用以下定律。它们是化简复杂电路的利器,也是考试的明确考点。
- Identity law: A + 0 = A ; A . 1 = A
- 同一律: A + 0 = A ; A . 1 = A
- Null law: A + 1 = 1 ; A . 0 = 0
- 零一律: A + 1 = 1 ; A . 0 = 0
- Idempotent law: A + A = A ; A . A = A
- 幂等律: A + A = A ; A . A = A
- Complement law: A + ¬A = 1 ; A . ¬A = 0
- 互补律: A + ¬A = 1 ; A . ¬A = 0
- Double negation: ¬(¬A) = A
- 双重否定律: ¬(¬A) = A
- Commutative law: A + B = B + A ; A . B = B . A
- 交换律: A + B = B + A ; A . B = B . A
- Associative law: (A+B)+C = A+(B+C) ; (A.B).C = A.(B.C)
- 结合律: (A+B)+C = A+(B+C) ; (A.B).C = A.(B.C)
- Distributive law: 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)
- Absorption law: A + A.B = A ; A.(A+B) = A
- 吸收律: A + A.B = A ; A.(A+B) = A
When simplifying, write the law you are using beside each step. This demonstrates understanding and can earn method marks even if a mistake creeps in.
化简时,每一步旁边写出所使用的定律。这能展示你的理解,即使有小错误也可能得到方法分。
4. De Morgan's Theorems | 德摩根定理
De Morgan’s theorems allow you to transform ANDs into ORs and vice versa under negation. They are crucial for converting expressions into forms that use only NAND or only NOR gates.
德摩根定理允许你在取反的情况下将 AND 转换为 OR,反之亦然。这在将表达式转换为仅使用 NAND 门或仅使用 NOR 门的电路中至关重要。
¬(A . B) = ¬A + ¬B
¬(A + B) = ¬A . ¬B
Remember to break the bar stepwise: replace the broken bar with an operator change and negate each variable. For longer expressions like ¬(A . B + C), treat B + C as a sub-expression, apply the theorem in layers.
记住分段去掉上划线:断开的横线对应运算符的改变,同时对每个变量取反。对于 ¬(A . B + C) 这类较长的表达式,把 B + C 当作子表达式,逐层应用定理。
A common exam task is to prove two expressions equivalent using De Morgan’s laws and other identities. Work on both sides until they meet in the middle.
考试中常见的任务是利用德摩根定律和其他恒等式证明两个表达式等价。从等式两边同时化简,直到它们相同。
5. Simplifying Boolean Expressions | 化简布尔表达式
Simplification reduces the number of gates and inputs, lowering cost and propagation delay. Methods include algebraic manipulation (using the laws) and Karnaugh maps.
化简可以减少门电路和输入端的数量,降低成本和传输延迟。方法包括代数化简(运用定律)和卡诺图。
Example: Simplify A + A.B + ¬A.B
示例:化简 A + A.B + ¬A.B
Step 1: A + A.B = A (Absorption) → A + ¬A.B
Step 2: A + ¬A.B = A + B (since A + ¬A.B = A + B via Distributive and Complement)
Hence the simplified expression is A + B.
步骤一:A + A.B = A(吸收律)→ A + ¬A.B
步骤二:A + ¬A.B = A + B(因为 A + ¬A.B = A + B,可通过分配律和互补律推导)
因此化简后的表达式为 A + B。
Always check your simplification with a truth table — the output columns of the original and simplified expressions must match for all input combinations.
始终用真值表检验化简结果——原始表达式和化简后表达式的输出列必须在所有输入组合下完全相同。
6. Sum of Products (SOP) and Product of Sums (POS) | 最小项之和与最大项之积
AQA often requires you to extract a Boolean expression from a truth table. The Sum of Products form takes each row where the output is 1, writes the product (AND) of the inputs (using ¬ if the input is 0), then sums (ORs) these products.
AQA 经常要求你从真值表提取布尔表达式。最小项之和(SOP)形式选取输出为 1 的每一行,写出输入变量的乘积项(若输入为 0 则取反),然后将这些乘积项相加(OR)。
mple, if output is 1 when A=0,B=1 and when A=1,B=0 and when A=1,B=1, the SOP expression is ¬A.B + A.¬B + A.B. This can be simplified to A + B.
例如,若输出在 A=0,B=1、A=1,B=0 和 A=1,B=1 时为 1,则 SOP 表达式为 ¬A.B + A.¬B + A.B。它可以化简为 A + B。
0 → true form, then multiply (AND) them. It is less common in the exam but still possible.
最大项之积(POS)形式采用对偶方式:考虑输出为 0 的行,写出输入变量的和项(OR),其中 0 取原变量,然后把这些和项相与(AND)。考试中出现较少,但仍有可能。
7. Karnaugh Maps for Two, Three and Four Variables | 二、三、四变量卡诺图
A Karnaugh map (K-map) is a visual grid that helps minimise Boolean expressions. The cells are arranged so that adjacent cells differ by only one variable (Gray code ordering).
卡诺图是一种帮助最小化布尔表达式的可视化网格。单元格按格雷码顺序排列,使得相邻单元格只有一个变量不同。
- 2-variable map: 2×2 grid, headers ¬A, A and ¬B, B.
- 二变量图:2×2 网格,表头为 ¬A, A 和 ¬B, B。
- 3-variable map: 2×4 grid, one side A/¬A, the other combinations of B,C in Gray order (00, 01, 11, 10).
- 三变量图:2×4 网格,一边为 A/¬A,另一边为 B、C 的格雷码组合 (00, 01, 11, 10)。
- 4-variable map: 4×4 grid, symmetrical axes labelled AB and CD in Gray code.
- 四变量图:4×4 网格,对称轴按格雷码标记 AB 和 CD。
The exam often provides a partially completed K-map and asks you to fill the remaining cells from a truth table or expression. Grid references matter — always double-check the ordering.
考试经常给出一个部分完成的卡诺图,要求你根据真值表或表达式填满剩余单元格。坐标顺序很关键——务必仔细检查。
8. Grouping Cells and Deriving Minimal Expressions | 圈选单元格并推导最简表达式
To find the minimal SOP expression, group adjacent cells containing 1. Groups must be rectangular, with dimensions of 1,2,4,8, etc. They can wrap around the edges of the map because of Gray code adjacency.
要找到最简 SOP 表达式,把相邻的值为 1 的单元格圈起来。圈必须是矩形,尺寸为 1,2,4,8 等。由于格雷码的相邻性,圈可以跨过地图边缘环绕。
Each group eliminates the variable that appears in both true and complemented forms. The resulting product term contains only the variables that remain constant within the group. Combine the terms with OR.
每个圈消除掉在其内部既以原变量又以反变量出现的那个变量。得到的乘积项只包含在该圈内保持不变的变量。最后用 OR 连接各项。
Example: In a 3-variable map with 1s at cells representing ¬A.¬B.C, ¬A.B.C, A.¬B.C, A.B.C, you can group all four 1s together. Within the group A changes and B changes, but C is always 1. The minimised expression is C.
示例:在一个三变量卡诺图中,值为 1 的单元格对应 ¬A.¬B.C、¬A.B.C、A.¬B.C、A.B.C,可以把这四个 1 圈在一起。圈内部 A 和 B 都发生变化,但 C 恒为 1,化简结果就是 C。
Always use the fewest possible groups, and each group should be as large as possible. Overlapping is allowed if it leads to larger groups.
圈数要尽可能少,每个圈要尽可能大。如果能使圈变大,允许重叠。
9. Don't Care Conditions | 无关项
Sometimes certain input combinations never occur in a given system, or we don't care about their output. These are marked as 'X' (don't care) in the K-map. You may treat each X as 0 or 1, whichever helps form a larger group.
有时某些输入组合在特定系统中永远不会出现,或者我们不关心它们的输出。这些在卡诺图中标记为 'X'(无关项)。你可以把每个 X 当作 0 或 1,具体视怎样有助于形成更大的圈而定。
Don't cares can drastically reduce the complexity of the final expression, so always look for them first when you begin grouping.
无关项可以极大降低最终表达式的复杂度,所以在开始圈选时首先扫一眼它们的分布。
10. NAND and NOR Universality | NAND 和 NOR 的完备性
Both NAND and NOR are functionally complete, meaning any Boolean function can be implemented using only NAND gates, or only NOR gates. AQA may ask you to redraw a circuit using solely NAND gates.
NAND 和 NOR 都是功能完备的,这意味着任何布尔函数都可以只用 NAND 门或只用 NOR 门来实现。AQA 可能要求你仅使用 NAND 门重画电路。
, then apply De Morgan to break the inner negation bar. For example, F = A.B + C.D becomes ¬(¬(A.B) . ¬(C.D)), which is a NAND-NAND structure.
把 SOP 表达式转换为全 NAND 形式:对整个表达式取双重否定,然后应用德摩根定律断开内部的否定横线。例如 F = A.B + C.D 变成 ¬(¬(A.B) . ¬(C.D)),即 NAND-NAND 结构。
Similarly, to use only NOR gates, start from a POS form and apply dual transformations. Practise both so you can handle any circuit in the exam.
类似地,若仅使用 NOR 门,从 POS 形式出发并应用对偶变换。两种转换都要练习,以应对考试中任何电路题。
11. Logic Circuit to Expression, and Vice Versa | 逻辑电路与表达式的相互转换
Given a logic diagram, trace the signal through each gate, writing the intermediate outputs as Boolean sub-expressions. Combine them step by step until the final output is expressed in terms of the inputs only. Brackets are essential to preserve the correct order of operations.
给定一个逻辑图,顺着信号穿过每个门,将中间输出写成布尔子表达式。一步步合并,直到最终输出只用输入变量表示。括号对于保持正确的运算顺序至关重要。
Conversely, when given a Boolean expression, draw the circuit by identifying the highest-level OR last. Work backwards: draw AND gates for product terms first, then feed their outputs into an OR gate. Insert NOT gates where variables are negated.
相反,当给出布尔表达式时,找出最外层的 OR 运算最后画。反向推导:先为每个乘积项绘制 AND 门,然后将它们的输出送入 OR 门。在变量取反的地方插入 NOT 门。
12. Exam Tips and Common Pitfalls | 考试技巧与常见错误
1. Bracket errors: Forgetting to apply De Morgan fully, leaving partial bars over groups, is the most frequent mistake. Break the bar completely or leave it until the end, but never mix.
1. 括号错误:应用德摩根定律不彻底,在组上残留部分横线,是最常见的错误。要么完全断开横线,要么留到最后再处理,但绝不要混用。
2. K-map adjacency: Students often miss wrap-around groups. Check top-bottom and left-right adjacency explicitly.
2. 卡诺图相邻性:学生经常遗漏环绕圈。明确检查上下相邻和左右相邻。
3. Truth table completeness: If you have 3 inputs, you need 8 rows. Skipping a combination costs marks.
3. 真值表完整性:如果有 3 个输入,就需要 8 行。漏写某个组合会失分。
4. Gate symbols: Use only the standard AQA symbols. Drawing a NAND as an AND with a bubble is acceptable; a box with 'NAND' written inside is not.
4. 门电路符号:只使用标准的 AQA 符号。把 NAND 画成带小圆圈的 AND 是可以的;画成方框并在里面写 'NAND' 则不行。
5. Simplicity speaks: If asked to "simplify as much as possible", a single literal like C (when that is the minimal result) scores full marks. Don't overcomplicate.
5. 简洁至上:如果要求“尽可能化简”,那么像 C 这样的单个文字(当它是最简结果时)就能得到满分。不要画蛇添足。
Published by TutorHao | A-Level AQA Computer Science Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)

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