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
One way to think about it is to consider the 10 comparison operations between the 5 numbers as your binary inputs. Then you have options:
Some of the possibilities will never occur, so I'm sure there's some simplification possible. For instance if (a>b) and (b>c) then (a>c) will always be true. Which will help with approach #1 and generates an error case in approach #2.