posted 18 years ago
The | operator is a normal OR.
So
0 | 0 = 0
1 | 0 = 1
0 | 1 = 1
1 | 1 = 1
Also it's nice to know how the ^ XOR works:
0 ^ 0 = 0
1 ^ 0 = 1
0 ^ 1 = 1
1 ^ 1 = 0
Transform all numbers in binairy numbers.
Apply the operators, and calculate it back.
(decimal, octal, hexadecimal)