Bit changes required to convert one int to another

Given two integers A & B. Determine how many bits required to convert A to B.

Answer:
 CountBits(A^B); 

No comments: