How to make logical OR with AND,and NOT?

主宰稳场 提交于 2019-12-19 05:17:48

问题


How to create a logical OR with logical AND, and logical NOT?


回答1:


Check De Morgans's laws. You are looking for the Substitution form.

P OR Q = NOT( (NOT P) AND (NOT Q) )



回答2:


It's De Morgan's Law:

A OR B = NOT ( NOT A AND NOT B )

Truth table for A OR B:

A B  X
0 0  0
0 1  1
1 0  1
1 1  1

Truth table for the De Morgan equivalent:

A B  !A  !B  (!A AND !B)   !(!A AND !B)
0 0   1   1       1              0
0 1   1   0       0              1
1 0   0   1       0              1
1 1   0   0       0              1



回答3:


Like not (not x and not y) ?




回答4:


Pretty simple:

A || B = !(!A && !B)



回答5:


Using DeMorgans law. The Negation of (Not A "And" Not B)



来源:https://stackoverflow.com/questions/8374895/how-to-make-logical-or-with-and-and-not

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!