& is the and operator. For example

10011100 &
01001101 =
00001100

i.e. Both bits of the two operands have to be set so that the resulting bit is also set.

| is the or operator. For Example

10011100 |
01001101 =
11011101

i.e. If any or both bits of the two operands is set, then the resulting bit is set too.


Always learn from history, to be sure you make the same mistakes again...