5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ド・モルガンの定理で論理式

Posted at
元の式 変換後の式
not A and not B not( A or B )
not A and B not( A or not B)
A and not B not( not A or B )
A and B not( not A or not B )
not A or not B not( A and B )
not A or B not( A and not B )
A or not B not( not A and B )
A or B not( not A and not B )

読みやすさは微妙ですが、場合によってはコードを短縮することができます。

例えば:

if (!a || !b) then ...

変換後↓

if !(a && b) then ...
5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?