Added Hamming Weight in Lua