If x > y, then this function will return 1, other wise return 0.

so far i have

int isitGreater(int x, int y) {

return (((y+((~x)+1)) >> 31) & 1);

but it's not working.

Im sure i have the logic right, if X - Y and I get a negative number, that means y > x , so therefore the 32nd bit is a 1, so i shift that bit to the right 31 times and then "and" it with "1".

why isnt it working?