Merge bit sequences a and b according to a mask
问题 According to the bit twiddling hacks website, the operation unsigned int a; // value to merge in non-masked bits unsigned int b; // value to merge in masked bits unsigned int mask; // 1 where bits from b should be selected; 0 where from a. unsigned int r; // result of (a & ~mask) | (b & mask) goes here r = a ^ ((a ^ b) & mask); allows to merge two bit sequences a and b according to a mask. I was wondering: Whether this operation had a specific/usual name? Whether specific assembly instruction