= operator returns true(-1) if both sides are matched
And operator returns a bitcomparation between both sides
If will go when you have the value <>0 which is whether when you use and or not because and will only add what shift is resulting in no change in the boolean that if needs. You have no need of that and this time.