The Hamming weight of a string is the number of symbols that are different from the zero-symbol of the alphabet used. It is thus equivalent to the Hamming distance from the all-zero string of the same length. For the most typical case, a string of bits, this is the number of 1's in the string. In this binary case, it is also called the population count, popcount or sideways sum. It is the digit sum of the binary representation of a given number.
Read more about Hamming Weight: Examples, History and Usage, Efficient Implementation, Language Support, Processor Support
Famous quotes containing the word weight:
“Europe has lived on its contradictions, flourished on its differences, and, constantly transcending itself thereby, has created a civilization on which the whole world depends even when rejecting it. This is why I do not believe in a Europe unified under the weight of an ideology or of a technocracy that overlooked these differences.”
—Albert Camus (19131960)