|
well you have two "loop:" lines, so that might be causing a problem.
I don't think you need to put anything in an array. Try some code like this:
[code]
get a
get b
xor a and b into c
set loopCounter to 0
set hamming = 0
loop:
and c with 0x01 into d
if d == 1
increment hamming
shift c right by 1
increment loopCounter
if loopCount <= 32*
goto loop
print hamming
* replace 32 by whatever number of bits you have in your integer
Note: you already have some of this code
|