Editorial Modulo Trick to Clear All Higher Order Bits Trick x % 2^b clears all set bits whose indices are >= bit.