[英]Boolean expression into java
After creating a truth table I have arrived at the following expression 创建真值表后,我得出以下表达式
B(AC + aC + Ac) (lowercase represents NOT..meaning a means NOT A)
Is it possible to represent this in java without actually expanding this expression? 是否可以在不实际扩展此表达式的情况下用Java表示呢? Meaning without writing something like this?
没有写这样的东西的意思?
if(B&&A&&C || B&&a&&C || B&&A&&c)
If I understand your notation correctly, since the complement of AC + aC + Ac
is ac
, this expression can be simplified to 如果我正确理解您的表示法,由于
AC + aC + Ac
的补码为ac
,因此该表达式可以简化为
if (B && !(a && c))
which is equivalent to 相当于
if (B && (A || C))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.