is there any function that will complement the variable. e.g int i = 0xAA complement of i = 0x55
look up "complement" in your 'C' textbook.
Hint: think bitwise...
http://www.keil.com/forum/docs/thread8928.asp#msg41647