A friend of mine has shown sometime ago the name of the below boolean technique/law but I forget that name unfortunately. Does someone know what it's called?

example in C language:

!(a || b)

It's a short to:

!a && !b
  • Did you mean to say !a && !b?
    – Rufflewind
    Aug 3 '14 at 18:25
  • yes, edited. I'm sorry.
    – Jack
    Aug 3 '14 at 18:27
  • In this case, the first is longer. Aug 3 '14 at 21:04

That's not a law - in fact it's quite wrong!

You want !a && !b. Then its one of De Morgan's laws.

  • yes, it was what I wanted. edited. I'm sorry.
    – Jack
    Aug 3 '14 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.