The OR operator (|) compares two numbers bit by bit. For each position, the result has a 1 if at least one input bit is 1. Only when both are 0 does the result have a 0.
Example: . In binary, and . Comparing: , , , . Result: .
OR is how you set bits. If you want to make sure bit 3 is turned on, you OR the number with .