Analysis of the Hamming Weight and properties of binary numbers for use in quantum algorithms