sterretje:
Use an XORbyte changedBits = oldBits ^ newBits;For each bit that has changed, changedBits will contain a 1; non-changed bits will be 0.
I am already doing the XOR comparison to see if the byte changed, how do I get the position that changed ? Do I just iterate through the byte and look for the 1's ?
I will look at your other suggestion as well - thanks.