I have two bit masks:
public static UInt64 Mask0 = 0xFFFFFFFF00000000UL;
public static UInt64 Mask1 = 0x00000000FFFFFFFFUL;
I have a ulong value:
UInt64 value = 0x1089000000054321;
Then based on a condition, I xor the value with one of the two bit masks.
if (condition == true)
value ^= Mask0;
else
value ^= Mask1;
Now the problem is that the value should be dynamic (unpredictable), and will change dynamically when the code is run. I actually won't know the original value (original value before being xored with the Mask). I just need to precisely check/detect which Mask (Mask0 or Mask1) was xored with the value. Any help will be appreciated.