跳转到内容
主菜单
主菜单
移至侧栏
隐藏
导航
首页
最近更改
随机页面
MediaWiki帮助
GSXAB的知识库
搜索
搜索
外观
登录
个人工具
登录
Advertising:
查看“︁逻辑与”︁的源代码
页面
讨论
简体中文
阅读
查看源代码
查看历史
工具
工具
移至侧栏
隐藏
操作
阅读
查看源代码
查看历史
刷新
常规
链入页面
相关更改
特殊页面
页面信息
外观
移至侧栏
隐藏
←
逻辑与
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
[[分类:二值变量运算]] {{InfoBox |name=逻辑与 |eng_name=logical AND |aliases=逻辑乘法,logical multiplication }} '''逻辑与'''('''logical AND''')指[[二值变量]]的一种[[运算]],相当于[[命题]][[真值]]间的[[合取]]联结词。与[[模 n 剩余类环|模 2 剩余类环]]上的乘法同构,故也称为'''逻辑乘法'''。 == 定义 == {{Operation |name=逻辑与 |operand=二值变量 |result=二值变量 |prototype=布尔代数 |domain=<math>\mathbb{B} \times \mathbb{B}</math> |codomain=<math>\mathbb{B}</math> }} 对二值变量 <math>x, y \in \mathbb{B} = \{0,1\}</math> ,将二元运算 <math>(1,1)\mapsto 1; (0,1)\mapsto 0;(1,0)\mapsto 0;(0,0)\mapsto 0</math> 称为'''逻辑与'''('''logical AND''')运算,也称为'''逻辑乘法'''运算,记作 <math>xy</math> 或 <math>x\cdot y</math> 。也有人记作 <math>x \& y</math> 、 <math>x \&\& y</math> 或 <math>x\land y</math> 。 也可以建模为 <math>\mathbf{F}_2</math> 上的乘法。 === 乘法表 === {| class='wikitable' |- ! <math>\cdot</math> ! T ! F |- ! T | style='background-color: rgba(0,255,0,0.1)' | T | style='background-color: rgba(255,0,0,0.1)' | F |- ! F | style='background-color: rgba(255,0,0,0.1)' | F | style='background-color: rgba(255,0,0,0.1)' | F |} == 性质 == 运算性质: * [[结合律]] * [[交换律]] * 对[[逻辑或]]满足[[分配律]] * 和逻辑或满足互相的[[吸收律]] * 与逻辑或、[[逻辑非]]满足德·摩根律 == 多元逻辑与 == 由于是一种符合结合律的运算,可以定义多元逻辑与运算。 == 变体 == === 短路逻辑与 === 在编程语言中,逻辑与通常被处理成一种短路的运算,也就是说两个操作数间存在一个[[顺序点]],当左侧可以确认为 <code>false</code> 时,不再计算右侧操作数的值。 === 三值逻辑与 === 对[[三值逻辑变量]],也存在对应逻辑与的同名运算。 {| class='wikitable' |- ! <math>\cdot</math> ! T ! U ! F |- ! T | style='background-color: rgba(0,255,0,0.1)' | T | U | style='background-color: rgba(255,0,0,0.1)' | F |- ! U | U | U | style='background-color: rgba(255,0,0,0.1)' | F |- ! F | style='background-color: rgba(255,0,0,0.1)' | F | style='background-color: rgba(255,0,0,0.1)' | F | style='background-color: rgba(255,0,0,0.1)' | F |} {{逻辑运算}}
返回
逻辑与
。
Advertising: