Move _bits_mask and _bits_shift operations to common header.