Making a note about binary logic.
[AND &]
Both elements are 1 get 1.
0&0=0
0&1=0
1&0=0
1&1=1
[OR |]
One element is 1 get 1.
0&0=0
0&1=1
1&0=1
1&1=1
[XOR ^]
Two different elements get 1, and the same element gets 0.
0&0=0
0&1=1
1&0=1
1&1=0
[NOT !]
change 1 to 0, 0 to 1.
!0=1
!1=0