nineTENdo wrote:
How does this happen? If i put an extra ASL A will it multply it by 6?
No, it will multiply by 8. You can only multiply by powers of 2 using shifts. The fact that it will only multiply by powers of 2 is a side effect of computers storing numbers in binary (base 2) form.
For example, if you shift left the number 3, in decimal, you get 30. You just multiplied it by 10, as we're using base 10. If you shift again, you'll get 300, wich is 3 multiplied by 100. Whenever you shift a number left, in any base, you are multiplying it by the base. Whenever you shift it right, you are dividing it by the base.
Multiplication and division by any number is more complicated than that, like the code that never-obsolete posted.