|
Used to calculate OR bitmask
Wikipedia
https://en.m.wikipedia.org/wiki/Mask_(computing)
Masking bits to 1
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.
Example: Masking on the higher nibble (bits 4, 5, 6, 7) the lower nibble (bits 0, 1, 2, 3) unchanged.
10010101 10100101
OR 11110000 11110000
-----------------
= 11110101 11110101
|