added the code to count how many bits to swap from one int to another