I got stuck in solving the problem as shown below
Suppose I have two Variable A=10010101 [Correct Bit Value] & B=11001010 [Error Bit value which needs to be compared with A]
The above two variables are eight bit, I need to compare the value at each position from most significant bit to the last bit. What I need is to print the position where they are not identical and what should be the correct/error value for that position.
Example: For B, second position bit value should be '0' when we compared to bit value at position 2nd for A.
I tried to use XOR operation but in that case i didn't find the correct value at that position. Also i want to let you know that Bit A value is fixed and bit B value comes dynamically form a device.
Thanks for your valuable time.
Just compare bits and if they are different, print the index and corresponding bit from A.