1. >>if(!(!A && B || A && !B))
((!true && false) || true) && !false => true
(!true && false) || (true && !false) => true

100 points for whoever comes up with an expression that won't evaluate to the same thing no matter what order it's evaluated in.

2. Originally Posted by major_small
fine, how's this:

if(!(!A && B || A && !B))

jeebus... and 10 points to anybody whow knows what that gate's called.
I believe that's an XNOR gate.

Originally Posted by Hunter2
100 points for whoever comes up with an expression that won't evaluate to the same thing no matter what order it's evaluated in.
How about "true || true && false"

(true || true) && false => false
true || (true && false) => true

3. Originally Posted by misplaced
don't get cute with that piece of information either and do
Code:
```//bad
if(x || func())```
Hey, I'd never thought of that one before! Clever! Would it be considered bad practice though?

4. Its advised to tell your compiler how you really mean to have something evaluated.

Code:
```if((x == 1 && y == 2) || (x == 2 && y == 65)) {
// do stuff.
}```

5. Originally Posted by major_small
fine, how's this:

if(!(!A && B || A && !B))

jeebus... and 10 points to anybody whow knows what that gate's called.

edit: and another 20 points to the person who brings me the head of the person that gives me bad rep for trying to be helpful.
0 0 true
0 1 false
1 0 false
1 1 true
Could it be a XOR gate?

Parenthesis, Not, And, Or
Thats the order that the bools are figured in...

6. >>How about "true || true && false"
What the bloody heck.. I spent about half an hour experimenting with varying combinations of those

7. Originally Posted by ~Kyo~
0 0 true
0 1 false
1 0 false
1 1 true
Could it be a XOR gate?
look once again, and you got that last one wrong.
Originally Posted by skiingwiz
I believe that's an XNOR gate.
DING! DING! DING!