thanks jpn it works,
is there any advantage in using bitwise AND operator in preference to == operator(although both works). How does the bitwise AND operator works here(ie. logic ) .