If m != n, then there are zero or more numbers in between them. And every consecutive number differs by the rightmost bit. The right-most zero will turn that bit into zero in the final result, hence we can shfit through that bit till m == n.