i don't understand how the SHL instruction works. i read masm help but it`s still not clear for me.

Say eax = 1011 in binary

After shl eax,1

It becomes 10110 in binary. All you do is shift the bits left.

After shl eax,1

It becomes 10110 in binary. All you do is shift the bits left.

If that didn't make sense to you either, add a few leading zeroes and all becomes clear.

0001011, shifted left by one bit, becomes:

0010110

Less obviously, shifting left by one bit, we just performed a *2 multiplication.

0001011 in binary is 11 in decimal.

0010110 in binary is 22 in decimal.

Have a nice day :)

0001011, shifted left by one bit, becomes:

0010110

Less obviously, shifting left by one bit, we just performed a *2 multiplication.

0001011 in binary is 11 in decimal.

0010110 in binary is 22 in decimal.

Have a nice day :)

Thnx for the help :p

Try this download here: