a |= b is the same as a = (a | b)
Boolean Variables
In a boolean context, it means:
if (b) {
a = true;
}
that is, if b is true then a will be true, otherwise a will be unmodified.
Bitwise Operations
In a bit wise context it means that every binary bit that's set in b will become set in a. Bits that are clear in b will be unmodified in a.
So if bit 0 is set in b, it'll also become set in a, per the example below:
This will set the bottom bit of an integer:
a |= 0x01
This will clear the bottom bit:
a &= ~0x01
This will toggle the bottom bit:
a ^= 0x01;