Figure out the fastest way to count the number of 1's in a n-bit number. Also, code it up as part of a function and then call the function on an arbitrary-length number. Assume that each 32bits of the number are stored in an integer array as shown below:

320 bit number is represented as:

int a[10];

a[9] = 0x99999999;

a[8] = 0x88888888;

....

a[0] = 0x0;

So, this number 320-bit number is:

0x9999 9999 8888 8888 7777 7777 ....0000 0000