Sorting five integers using bitwise or comparison operators can be achieved by first getting the highest number then the second highest then the third and so on.
Her
The third highest number of five integers is the median, so if you get the third highest number you are fine.