Artificial intelligent assistant

Help me, was given a Mathematical problem to figure out, but the answers told me it was just demorgans law in c code. Was given this to figure out. He said its mathematical, no its not homework. More of one guy trying to prove he is smarter than me. The code: (!(a&&b)) == |!a||!b| T !(a||b) == !a&&!b I think it might be some symbolic logic, but couldn't figure out from reading about symbolic mathematics from google searches. That is only my guess.

This is (almost) DeMorgan's laws written in C-language syntax (though other languages use the same syntax, too). Writing it a bit more tidily, it would be:


!(a && b) = (!a) || (!b)

!(a || b) = (!a) && (!b)


That's not exactly what you wrote, but I expect it's what you meant to write.

I don't know anything about symbolic logic notation, but in set-theoretic notation, the equivalent laws would be:

$$ (A \cap B)^c = A^c \cup B^c $$

$$ (A \cup B)^c = A^c \cap B^c $$

Or, in English (almost):


not(A and B) = (not A) or (not B)
not(A or B) = (not A) and (not B)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8d554a9a2ebd6e6259b2505cf79f4938