added algorithm to swap even/odd bits in an integer