Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In computer
science, a mask is data that is used for bitwise operations,
particularly in a bit field. Using a mask, multiple bits in a byte,
nibble, word can be set either on, off or inverted from on to off in a
single bitwise operation. To turn certain bits on, the bitwise OR
operation can be used, following the principle that Y OR 1 = 1 and Y OR
0 = Y. Therefore, to make sure a bit is on, OR can be used with a 1. To
leave a bit unchanged, OR is used with a 0.There is no way to change a
bit from on to off using the OR operation. Instead, bitwise AND is used.
When a value is ANDed with a 1, the result is simply the original value,
as in: Y AND 1 = Y.