bitwise operations for submask