For a particular application using bitwise masks to store a value, I'd like to perform a certain bitwise filter, but I'm not sure what it's called, or how you'd actually do it in a sensible way.
// I'll just refer to the operator as "?" for the sake of example:
Input1 ? Input2 = Output
0 ? 0 = 0
0 ? 1 = 0
1 ? 0 = 1
1 ? 1 = 0
101 110 1100
? 111 ? 100 ? 1010
= 000 = 010 = 0100
My language is PHP, but any explanation is welcome.