Hmm, AND and OR (and even XOR) are math operations... So what they really do is perform Bit-Wise logic. For example, if you do "3 and 6", it will return 2. The reason is if you AND these two:
0000000000000011 (this is 3 in binary)
0000000000000110 (this is 6 in binary)
0000000000000010 (you get this which is 2)
The result has a 1 bit only if both bits from the inputs are 1. So, if you did this:
If A=3: and B=6
You would be doing this:
If (A=3) and (B=6)
However, doing this will result in 0 no matter what:
If A=6 and B=3
Lets say B=3 and A=6. The reason is that if you break it down:
A=6 and
B=3
A=6 and 1
A=0
0
See the issue? 6 and 1 returns 0