# 逻辑代数

## 逻辑代数中的几个概念

• 正逻辑体制规定：高电平为逻辑1，低电平为逻辑0。
• 负逻辑体制规定：低电平为逻辑1，高电平为逻辑0。

## 逻辑运算

### 基本运算

• 与（合取），记作 xy（有时记作 x AND y 或 Kxy），在 x = y = 1 情况下，满足 xy = 1；其他情况下 xy = 0。
• 或（析取）, 记作 xy（有时记作 x OR y 或 Axy），在 x = y = 0 情况下，满足 xy = 0；其他情况下 xy = 1。
• 非 （否定）, 记作 ¬x（有时记作 NOT x, Nx 或 !x），在 x = 1 情况下，满足 ¬x = 0；而在 ¬x = 1 情况下，x = 0。

{\displaystyle {\begin{aligned}x\wedge y&=x\times y\\x\vee y&=x+y-(x\times y)\\\neg x&=1-x\end{aligned}}}

${\displaystyle x}$  ${\displaystyle y}$  ${\displaystyle x\wedge y}$  ${\displaystyle x\vee y}$
0 0 0 0
1 0 0 1
0 1 0 1
1 1 1 2

${\displaystyle x}$  ${\displaystyle \neg x}$
0 1
1 0

{\displaystyle {\begin{aligned}x\wedge y&=\neg (\neg x\vee \neg y)\\x\vee y&=\neg (\neg x\wedge \neg y)\end{aligned}}}

### 衍生运算

${\displaystyle x\rightarrow y=\neg {x}\vee y}$
${\displaystyle x\oplus y=(x\vee y)\wedge \neg {(x\wedge y)}}$
${\displaystyle x\equiv y=\neg {(x\oplus y)}}$

${\displaystyle x}$  ${\displaystyle y}$  ${\displaystyle x\rightarrow y}$  ${\displaystyle x\oplus y}$  ${\displaystyle x\equiv y}$
0 0 1 0 1
1 0 0 1 0
0 1 1 1 0
1 1 1 0 1

## 运算律

 ${\displaystyle a\lor (b\lor c)=(a\lor b)\lor c}$ ${\displaystyle a\land (b\land c)=(a\land b)\land c}$ 结合律 ${\displaystyle a\lor b=b\lor a}$ ${\displaystyle a\land b=b\land a}$ 交换律 ${\displaystyle a\lor (a\land b)=a}$ ${\displaystyle a\land (a\lor b)=a}$ 吸收律 ${\displaystyle a\lor (b\land c)=(a\lor b)\land (a\lor c)}$ ${\displaystyle a\land (b\lor c)=(a\land b)\lor (a\land c)}$ 分配律 ${\displaystyle a\lor \lnot a=1}$ ${\displaystyle a\land \lnot a=0}$ 互补律 ${\displaystyle a\lor a=a}$ ${\displaystyle a\land a=a}$ 幂等律 ${\displaystyle a\lor 0=a}$ ${\displaystyle a\land 1=a}$ 有界律 ${\displaystyle a\lor 1=1}$ ${\displaystyle a\land 0=0}$ ${\displaystyle \lnot 0=1}$ ${\displaystyle \lnot 1=0}$ 0 和 1 是互补的 ${\displaystyle \lnot (a\lor b)=\lnot a\land \lnot b}$ ${\displaystyle \lnot (a\land b)=\lnot a\lor \lnot b}$ 对偶律 ${\displaystyle \lnot \lnot a=a}$ 对合律

## 应用

### 计算机

20世纪早期，一些电子工程师领悟到逻辑代数很像某种电子电路的行为。香农在它1937年的论文中证明了这种行为与逻辑代数等价。

## 参考文献

1. ^ Boole, George. An Investigation of the Laws of Thought. Prometheus Books. 2003 [1854]. ISBN 978-1-59102-089-9.
2. ^ "The name Boolean algebra (or Boolean 'algebras') for the calculus originated by Boole, extended by Schröder, and perfected by Whitehead seems to have been first suggested by Sheffer, in 1913." E. V. Huntington, "New sets of independent postulates for the algebra of logic, with special reference to Whitehead and Russell's Principia mathematica", in Trans. Amer. Math. Soc. 35 (1933), 274-304; footnote, page 278.
3. ^ Givant, Steven; Halmos, Paul. Introduction to Boolean Algebras. Undergraduate Texts in Mathematics, Springer. 2009. ISBN 978-0-387-40293-2.
4. ^ Logic Levels - learn.sparkfun.com. learn.sparkfun.com. [2016-12-12].