Hamming weight code