# Hamming weight

## Number of nonzero symbols in a string / From Wikipedia, the free encyclopedia

#### Dear Wikiwand AI, let's keep it short by simply answering these key questions:

Can you list the top facts and stats about Hamming weight?

Summarize this article for a 10 year old

SHOW ALL QUESTIONS

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, or the digit sum of the binary representation of a given number and the *ℓ*₁ norm of a bit vector. In this binary case, it is also called the **population count**,^{[1]} **popcount**, **sideways sum**,^{[2]} or **bit summation**.^{[3]}

**More information**String ...

String | Hamming weight |
---|---|

11101 |
4 |

11101000 |
4 |

00000000 | 0 |

678012340567 |
10 |

Close

This article needs additional citations for verification. (January 2009) |