1,885
edits
Changes
→XOR: Corrected bit range
Therefore the bitwise ''XOR'' is used to '''flip (invert) bits''' from 0 to 1 and vice-versa.
For example, bits 0-3 4:7 can be flipped while preserving the remaining bits in a byte by XORing a mask of 11110000 (0xF0):
{|cellspacing="0" cellpadding="5" border="1"