Suppose we want to take a bitwise OR of 5 and 12:
- Covert both numbers to binary; 5 is 0101 and 12 is 1100
- Bitwise OR performs an OR operation bit by bit, starting from the first bit: 5 | 12 0 || 1 = 1 1 || 1 = 1 0 || 0 = 0 1 || 0 = 1
- Thus, 5 | 12 = 1101 which is 13.