Changed accumulator to unsigned 32-bit int. Accumulator counts the number of bits set to 1.