Let's look at your constants:
Do you know what is going on here? The ^ operator performs a bitwise exclusive or (XOR). The truth table for this operation is as follows:
In my logic class, my professor calls this the "soup or salad" OR. This is because it is true when only one of the operands is true. Typically when a waiter asks if you want soup or salad, you don't reply "both" like you could if it were an inclusive or.
Anyway, let's analyze the values given to each of your constants:
For simplicity, I will only use 4-bit numbers since I don't want to write out all those leading zeros in a real 16-bit int. So this operation looks like this:
And the rest of them are
Is this what you intend? If so, then you probably need to rethink what values will work for each of these constants. Typically when you are using bit masks like this,
you should have at most a single bit turned on. The value for JUICY looks a little suspicious to me.
So what values DO you want to use for each bit mask? (I think someone has already given a suggestion, so I won't repeat it.)
Hopefully this helps gives you some ideas about where to go from here. Let us know if you need more help.
Layne