逻辑非
| 逻辑非 | |
|---|---|
| 术语名称 | 逻辑非 |
| 英语名称 | bitwise NOT |
| 别名 | 按位非, 位非, 位反, 按位取补, bitwise complement |
逻辑非(logical NOT)指二值变量的一种一元运算,相当于命题的否定联结词。与模 2 剩余类环上的一元运算 [math]\displaystyle{ 1-x }[/math] 同构。
定义
| 逻辑非 | |
|---|---|
| 运算名称 | 逻辑非 |
| 运算符号 | |
| Latex | |
| 运算对象 | 二值变量 |
| 运算元数 | 2 |
| 运算结果 | 二值变量 |
| 结构 | 布尔代数 |
| 定义域 | [math]\displaystyle{ \mathbb{B} }[/math] |
| 陪域 | [math]\displaystyle{ \mathbb{B} }[/math] |
对二值变量 [math]\displaystyle{ x \in \mathbb{B} = \{0,1\} }[/math] ,将二元运算 [math]\displaystyle{ 1\mapsto 0; 0\mapsto 1 }[/math] 称为逻辑非(logical NOT)运算,记作 [math]\displaystyle{ \bar{x} }[/math] 。也有人记作 [math]\displaystyle{ -x }[/math] 、 [math]\displaystyle{ 1-x }[/math] 、 [math]\displaystyle{ 1\oplus x }[/math] 、 [math]\displaystyle{ ~x }[/math] 或 [math]\displaystyle{ \lnot x }[/math] 。
性质
运算性质:
变体
三值逻辑非
对三值逻辑变量,也存在对应逻辑非的同名运算。
| [math]\displaystyle{ \bar{} }[/math] | T | U | F |
|---|---|---|---|
| F | U | T |
| 逻辑运算 | |||
|---|---|---|---|
| 逻辑非 | 逻辑与 | 逻辑或 | 逻辑异或 |