Ok, as far I understood from your comments you have a LPC1768 with QEI, but the real problem is that you want signed math. Well it's not a problem at all, you have just to define or parse the QEI output (let say 32 bit unsigned integer uint) to signed integer int.
You may do all the signed or unsigned math you want. If you subtract actual value in uint format with other uint, you get the uint result, which will give you always the same direction. For the sake of simplification, let we have a compass 0(360)-359 degrees. If you subtract 350-20 you get 330, but if you subtract 20-350 you get 30. The angle difference is always 30 degrees, but you get two different results.
Now suppose you do signed math, same angles 20 and -10, 20--10=30, -10-20=-30. You see, when using signed math, you always get the shortest distance and direction.
Same rules apply when using binary numbers: signed will always give you shortest path - so you don't have to care about roll-over with sign (direction, in which direction should I turn to reach the target with a shortest move).
I give you an advice: there is no roll over problem ever, try to use the calculator and you will understand.