function [varargout]=eff_ham(myNumber)

count = 0;
while(logical(myNumber))
    count = count+ 1; 
    myNumber = bitand(uint8(myNumber), uint8(myNumber - 1));
end

varargout={count};