📚 IB Mathematics: Logic Gates and Switching Functions in Boolean Algebra | IB数学:布尔代数中的逻辑门与开关函数
Boolean algebra is the mathematical foundation of digital electronics. In IB Mathematics, students encounter logic gates and switching functions as a powerful application of mathematical logic and set theory. Because Boolean variables can only take two values, 0 and 1, every logical relationship can be expressed, simplified, and turned into a physical circuit.
布尔代数是数字电子技术的数学基础。在国际文凭数学课程中,学生通过逻辑门和开关函数,深入理解数学逻辑与集合论在实际电路中的强大应用。由于布尔变量只能取 0 和 1 两个值,任何逻辑关系都可以被表达、化简,并转化为实际电路。
1. Boolean Algebra and Logic Circuits | 布尔代数与逻辑电路导论
A Boolean variable is a symbol such as A, B, or C that represents either true or false, usually written as 1 or 0. A Boolean function maps a set of Boolean variables to a single Boolean output. In electrical terms, a switch can be open or closed; in digital terms, a circuit can be high or low.
布尔变量是 A、B、C 这样的符号,用来表示真或假,通常写作 1 或 0。布尔函数将一组布尔变量映射为一个布尔输出。在电路中,开关可以是断开或接通;在数字电路中,电平可以是高或低。
The algebra we use for these values is not ordinary arithmetic. The symbol + represents OR, and the symbol · represents AND, while the prime symbol ‘ represents NOT. These three operations are the building blocks of every logic gate.
处理这些值所使用的代数并不是普通算术。符号 + 表示“或”,符号 · 表示“与”,而撇号 ‘ 表示“非”。这三种运算是所有逻辑门的基础构件。
2. Basic Logic Gates: AND, OR, NOT | 基本逻辑门:与门、或门、非门
An AND gate produces output 1 only when every input is 1. If inputs are A and B, the expression is F = A · B.
与门仅在所有输入都为 1 时输出 1。如果输入为 A 和 B,表达式为 F = A · B。
An OR gate produces output 1 when at least one input is 1. The expression is F = A + B. This is a logical sum, not ordinary addition, so 1 + 1 = 1.
或门在至少一个输入为 1 时输出 1。表达式为 F = A + B。这是逻辑加,不是普通加法,因此 1 + 1 = 1。
A NOT gate, also called an inverter, reverses the input. If the input is A, the output is F = A’. The table below summarises these three basic gates.
非门又称反相器,它将输入取反。若输入为 A,则输出为 F = A’。下表概括了这三种基本逻辑门。
| Gate | Boolean Expression | Output Condition |
|---|---|---|
| AND | F = A · B | 1 only if A = 1 and B = 1 |
| OR | F = A + B | 1 if A = 1 or B = 1 |
| NOT | F = A’ | 0 when A = 1, 1 when A = 0 |
3. Derived Gates: NAND, NOR, XOR, XNOR | 派生逻辑门:与非门、或非门、异或门、同或门
A NAND gate is the complement of AND, so its expression is F = (A · B)’. A NOR gate is the complement of OR, so F = (A + B)’. Both NAND and NOR are called universal gates because any logical circuit can be built using only NAND or only NOR gates.
与非门是与门的补,表达式为 F = (A · B)’。或非门是或门的补,表达式为 F = (A + B)’。与非门和或非门都称为通用门,因为只用其中一种便可以构造任意逻辑电路。
An XOR gate, or exclusive OR, gives output 1 when the inputs are different. It is written as F = A ⊕ B, and can be expanded as F = A’B + AB’. An XNOR gate is the complement of XOR, giving output 1 when the inputs are equal:
异或门在输入不同时输出 1,记为 F = A ⊕ B,可展开为 F = A’B + AB’。同或门是异或门的补,在输入相同时输出 1:
XNOR: F = (A ⊕ B)’ = A · B + A’ · B’
| Gate | Expression | Meaning |
|---|---|---|
| NAND | F = (A · B)’ | 0 only when both inputs are 1 |
| NOR | F = (A + B)’ | 1 only when both inputs are 0 |
| XOR | F = A ⊕ B | 1 when inputs differ |
| XNOR | F = A · B + A’ · B’ | 1 when inputs are equal |
4. Truth Tables and Boolean Expressions | 真值表与布尔表达式
A truth table lists every possible combination of input values and the corresponding output of a Boolean function. For n input variables, the table needs 2ⁿ rows. Each row is an assignment of 0s and 1s to the variables.
真值表列出所有可能的输入组合以及布尔函数的对应输出。对于 n 个输入变量,真值表需要 2ⁿ 行。每一行是变量的一组 0、1 取值。
The table below shows the outputs of the main two-input gates for each input combination.
下表展示了常见双输入逻辑门在每个输入组合下的输出。
| A | B | AND A·B | OR A+B | NAND (A·B)’ | NOR (A+B)’ | XOR A⊕B | XNOR A·B + A’·B’ |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
5
Published by TutorHao | IB Mathematics Revision Series | aleveler.com
更多咨询请联系16621398022(同微信)
屏轩国际教育cambridge primary/secondary checkpoint, cat4, ukiset,ukcat,igcse,alevel,PAT,STEP,MAT, ibdp,ap,ssat,sat,sat2课程辅导,国外大学本科硕士研究生博士课程论文辅导Cancel reply