Conditional Using Bitwise Operators
问题 How is the conditional operator represented using bitwise operators? It is a homework question where I have to implement the conditional operator using only bitwise operations. It would be simple if if statements were allowed, however it has to be strictly bitwise operators. Only the operators ! , ~ , & , ^ , | , + , >> , and << can be used. No if statements or loops can be used. The function takes three ints and works just like the normal conditional operator. The first argument is evaluated