← 返回资讯屏轩教育 · 行业资讯

Boolean Algebra: Logic Gates and Switching Functions | 布尔代数:逻辑门与开关函数

2026-08-03 03:05 · 本文部分内容由AI辅助创作

📚 Boolean Algebra: Logic Gates and Switching Functions | 布尔代数:逻辑门与开关函数

Boolean algebra forms the mathematical backbone of digital electronics and computer science. By reducing logical statements to algebraic expressions involving variables that take only the values 0 and 1, it allows engineers to design, analyse, and simplify complex switching circuits.

布尔代数是数字电子学和计算机科学的数学支柱。它把逻辑语句归结为只取 0 和 1 两个值的变量的代数表达式,使工程师能够设计、分析和化简复杂的开关电路。

In the International Baccalaureate (IB) Mathematics syllabus, this topic bridges pure algebra and real‑world technology. You will explore logic gates, truth tables, Boolean expressions, and methods for minimising switching functions—all essential for understanding how computers process information at the hardware level.

在国际文凭(IB)数学课程中,这一主题连接了纯代数与现实技术。你将探索逻辑门、真值表、布尔表达式以及最小化开关函数的方法——所有这些都是理解计算机如何在硬件层面处理信息的基础。

1. Boolean Algebra Foundations | 布尔代数基础

Boolean algebra operates on a set of only two elements, typically labelled 0 (FALSE) and 1 (TRUE). The three core operations are AND (conjunction), OR (disjunction), and NOT (negation). Every logical function can be built from these primitives.

布尔代数仅在一个含有两个元素的集合上运算,通常标记为 0(FALSE)和 1(TRUE)。三种核心运算是 AND(合取)、OR(析取)和 NOT(否定)。任何逻辑函数都可以由这些基本操作构建。

An algebraic structure (B, +, ·, ', 0, 1) that satisfies the Boolean postulates—closure, associativity, commutativity, distributivity, identity, and complement—qualifies as a Boolean algebra. In digital circuit terms, '+' represents OR, '·' represents AND, and the prime symbol (') represents NOT.

满足布尔公设——封闭性、结合律、交换律、分配律、单位元和补元——的代数结构 (B, +, ·, ', 0, 1) 就是一个布尔代数。在数字电路的语境中,'+' 表示 OR,'·' 表示 AND,撇号 (') 表示 NOT。

2. Basic Logic Operations | 基本逻辑运算

The AND operation outputs 1 only when all inputs are 1. For two variables A and B, we write A · B or simply AB. The OR operation outputs 1 when at least one input is 1, written A + B.

AND 运算仅当所有输入为 1 时才输出 1。对于两个变量 A 和 B,写作 A · B 或简写为 AB。OR 运算当至少一个输入为 1 时就输出 1,写作 A + B。

The NOT operation, or complement, inverts its single input: if A = 0 then A' = 1; if A = 1 then A' nally complete, meaning any Boolean function can be expressed using only AND, OR, and NOT.

NOT 运算,或称求补,反转其单一输入:若 A = 0 则 A' = 1;若 A = 1 则 A' = 0。这三种运算在功能上是完备的,这意味着任何布尔函数都可以仅用 AND、OR 和 NOT 来表达。

3. Truth Tables | 真值表

A truth table systematically lists all possible combinations of input values and the corresponding output of a Boolean expression. For n input variables, there are 2ⁿ rows. Truth tables are the first step in designing or verifying a logic circuit.

真值表系统地列出输入值的所有可能组合以及布尔表达式对应的输出。对于 n 个输入变量,共有 2ⁿ 行。真值表是设计或验证逻辑电路的第一步。

Below is the truth table for the function F = A + B'·C (OR with AND of NOT B and C).

下面是函数 F = A + B'·C(A 加上 B 的补与 C 的 AND)的真值表。

ABCB'B'·CF = A + B'·C
000100
001111
010000
011000
100101
101111
110001
111001

The construction of a truth table reveals the behaviour of the switching function for every input condition and is essential before any circuit implementation.

真值表的构建揭示了开关函数在每种输入条件下的行为,这在任何电路实现之前都是必不可少的。

4. Logic Gates and Their Symbols | 逻辑门与其符号

Logic gates are physical implementations of Boolean operations. Standard gates include AND, OR, NOT, NAND, NOR, XOR, and XNOR. Each gate has a distinct ANSI/IEEE symbol, but in schematic capture tools, rounded rectangles or distinctive shapes are used.

逻辑门是布尔运算的物理实现。标准逻辑门包括 AND、OR、NOT、NAND、NOR、XOR 和 XNOR。每种门都有独特的 ANSI/IEEE 符号,但在原理图捕获工具中,通常用圆角矩形或特殊形状表示。

The table below summarises common logic gates, their Boolean expressions, and truth tables for two inputs.

下表总结了常见的逻辑门、它们的布尔表达式以及两输入情况下的真值表。

GateBoolean ExpressionTruth Table (A, B → Output)
ANDF = A · B(0,0)→0; (0,1)→0; (1,0)→0; (1,1)→1
ORF = A + B(0,0)→0; (0,1)→1; (1,0)→1; (1,1)→1
NOTF = A'(0)→1; (1)→0
NANDF = (A · B)'(0,0)→1; (0,1)→1; (1,0)→1; (1,1)→0
NORF = (A + B)'(0,0)→1; (0,1)→0; (1,0)→0; (1,1)→0
XORF = A ⊕ B = A·B' + A'·B(0,0)→0; (0,1)→1; (1,0)→1; (1,1)→0
XNORF = A ⊙ B = A·B + A'·B'(0,0)→1; (0,1)→0; (1,0)→0; (1,1)→1

In IB examinations, you may be asked to draw or interpret these symbols and to write the Boolean expression that corresponds to a logic gate circuit.

广告 / Sponsored

在 IB 考试中,你可能需要绘制或解读这些符号,并写出与逻辑门电路对应的布尔表达式。

5. Universal Gates: NAND and NOR | 通用门:与非门和或非门

NAND and NOR gates are called universal gates because any Boolean function can be implemented using only NAND gates or only NOR gates. For instance, a NOT gate is obtained by connecting both inputs of a NAND gate together.

与非门和或非门被称为通用门,因为任何布尔函数都可以仅用与非门或仅用或非门来实现。例如,将与非门的两个输入端连接在一起即可得到一个非门。

An AND function is built by following a NAND gate with a NAND‑converted NOT. Similarly, an OR function is realised by inverting the inputs to a NAND gate. This property is crucial in integrated circuit manufacturing, where standardising on one gate type reduces complexity.

与函数可以通过一个与非门后再接一个由与非门构成的反相器来实现。类似地,或函数可以通过对与非门的输入取反得到。这一性质在集成电路制造中至关重要,因为只采用一种门类型可以降低复杂度。

6. Boolean Laws and Identities | 布尔代数定律与恒等式

Boolean algebra is governed by a set of laws that allow the manipulation and simplification of expressions. Key laws include:

布尔代数由一组定律支配,这些定律允许对表达式进行操作和化简。主要定律包括:

Identity law: A + 0 = A and A · 1 = A
单位律:A + 0 = A 和 A · 1 = A

Complement law: A + A' = 1 and A · A' = 0
补余律:A + A' = 1 和 A · A' = 0

Idempotent law: A + A = A and A · A = A
幂等律:A + A = A 和 A · A = A

Domination law: A + 1 = 1 and A · 0 = 0
支配律:A + 1 = 1 和 A · 0 = 0

Distributive law: A · (B + C) = A·B + A·C and 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 and A·(A+B) = A
吸收律:A + A·B = A 和 A·(A+B) = A

These laws are the algebraic foundation for reducing complex switching functions to minimal forms.

这些定律是将复杂开关函数化简为最简形式的代数基础。

7. Simplification Using Algebraic Methods | 代数化简方法

n algebraically, we apply the identities step by step. For example, simplify F = A·B + A·B'.

要代数地最小化一个布尔表达式,我们逐步应用恒等式。例如,化简 F = A·B + A·B'。

F = A·(B + B') = A·1 = A

A more complex case: F = A·B + A' Using the consensus theorem, the term B·C is redundant and can be eliminated: F = A·B + A'·C.

一个更复杂的例子:F = A·B + A'·C + B·C。利用一致定理,项 B·C 是冗余的,可以消去:F = A·B + A'·C。

Algebraic simplification requires familiarity with all Boolean laws and a good strategic sense, but for larger expressions graphical methods like Karnaugh maps are more systematic.

代数化简需要熟悉所有布尔定律并具备良好的策略性眼光,但对于更大的表达式,像卡诺图这样的图形方法更具系统性。

8. Karnaugh Maps (K‑maps) | 卡诺图

A Karnaugh map is a grid‑ f a truth table that facilitates the grouping of adjacent minterms to obtain a minimal sum‑of‑cts expression. For two variables, the map is a 2×2 grid; for three variables, a 2×4 grid.

卡诺图是一种基于网格的真值表表示法,便于将相邻的最小项分组,从而获得最简积之和表达式。对于两个变量,图为 2×2 网格;对于三个变量,图为 2×4 网格。

Each cell corresponds to a minterm, labelled according to a Gray code sequence so that neighbouring cells differ by exactly one variable. Groups of size 1, 2, 4, or 8 can be looped to eliminate the variable that changes in the group and to keep the variable that remains constant.

每个单元格对应一个最小项,按照格雷码顺序标记,使得相邻单元格仅有一个变量不同。可以对大小为 1、2、4 或 8 的组画圈,以消去在组内变化的变量,并保留保持不变的变量。

,C) = Σ(1,2,3,6) is minimised by grouping minterms 1 and 3 (A=0, B=1, C changes → term = A'·B) and minterms 2 and 6 (A changes, B=1, C=0 → term = B·C'). The simplified function is F = A'·B + B·C'.

例如,函数 F(A,B,C) = Σ(1,2,3,6) 通过将最小项 1 和 3 分组(A=0, B=1, C 变化 → 项 = A'·B)以及将最小项 2 和 6 分组(A 变化, B=1, C=0 → 项 = B·C')进行最小化。化简后的函数为 F = A'·B + B·C'。

K‑maps are a powerful tool to simplify switching functions up to four variables by hand; beyond that, automated algorithms are used in industry.

卡诺图是一种强大的工具,可手工化简最多四个变量的开关函数;超过四个变量,工业界会使用自动化算法。

9. Switching Functions | 开关函数

ut of a combinational logic circuit. It is fully defined by its truth table and can be expressed in canonical forms—sum of minterms (SOP) or product of maxterms (POS).

开关函数是一个映射 f: {0,1}ⁿ → {0,1},它描述了组合逻辑电路的输出。它由真值表完全定义,并可以用规范形式表示——最小项之和(SOP)或最大项之积(POS)。

of three inputs outputs 1 when at least two inputs are 1. Its SOP is F = A·B + A·C + B·C.

SOP 形式列出所有使输出为 1 的输入组合,将每个组合写成一个乘积项。例如,一个三输入多数函数当至少两个输入为 1 时输出 1。其 SOP 为 F = A·B + A·C + B·C。

Switching functions form the link between a verbal problem statement and the gate‑level implementation. Being able to extract a switching function from a word problem is a key skill tested in IB Mathematics.

开关函数构成了语言问题陈述与门级实现之间的纽带。能够从文字题中提取开关函数是 IB 数学考查的一项关键技能。

10. De Morgan's Theorems | 德摩根定理

De Morgan's theorems establish a fundamental relationship between AND and OR operations under negation:

(A · B)' = A' + B'
(A + B)' = A' · B'

These theorems are invaluable for converting expressions into forms that use only one type of gate or for removing long complement bars. They also generalise to multiple variables:

(A·B·C)' = A' + B' + C'

德摩根定理建立了取反条件下 AND 和 OR 运算之间的基本关系。这些定理对于将表达式转换为只使用一种门类型的形式或移除长的反变量横杠非常有用。它们也向多个变量推广。

When simplifying circuits, De Morgan's theorems are often applied together with double negation (A'' = A) to push inversions to individual inputs or to eliminate NAND‑NOR confusion.

在化简电路时,德摩根定理常常与双重否定律(A'' = A)一起应用,将反相推到单个输入端或消除与非‑或非混淆。

11. Designing a Simple Digital Circuit: Half Adder | 设计一个简单的数字电路:半加器

A half adder is a circuit that adds two single‑bit binary numbers and produces a sum bit and a carry bit. The truth table is:

半加器是将两个单比特二进制数相加并产生一个和位与一个进位位的电路。其真值表为:

ABSum (S)Carry (C)
0000
0110
1010
广告 / Sponsored
官网正版 国际课程数学核心词汇 唯寻国际教育 全英 学科 GCSE A Level IB MYP IB IBDP 美高…
数学 备考教辅 · 正版现货 · 与本文内容相关
查看详情 / View on Taobao参考价 ¥19.7

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

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao