Added code to calculate Hamming Weight of binary number