Make bitmask conversion more readable