Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   Multiplying in Assembly (http://www.go4expert.com/forums/multiplying-in-assembly-t18288/)

dsptl 2Jul2009 03:14

Multiplying in Assembly
How can you multiply the content of register %o0 by 15 without calling .mul or ading %o0 to itself 15 times in Assembly?

xpi0t0s 2Jul2009 15:07

Re: Multiplying in Assembly
Shift it left 4 times (equivalent to multiplying by 16) and subtract the original value.

0x0012 << 4 = 0x0120

All times are GMT +5.5. The time now is 22:37.