How might I obtain an integer's absolute value without using the if statement or abs? ().
At first, I tried using shift bits left () to move the negative sign outside of the range before shifting bits right to put it back, but sadly, it didn't work for me.
Please explain the problem and offer any other possible solutions.