private int FindMask(int mask) { int k = 0; for (; k < 32; ++k) { if ((mask & 1) == 1) break; mask = Util.USR(mask, 1); } return mask; }