replaced "(a & b) | (~a & c)" with "(a & (b ^ c)) ^ c" in select