3Write in ARM assembly language the following operations wit
3.Write in ARM assembly language the following operations without using multiplication instruction (5p.each)
       3.1. A * 17
       3.2. A * 23
Solution
Firstly for A*17, lets do multilpication like A*17 = A*16 + A
mov bx,ax ; save a*1 into b
shl ax,1 ; ax=ax*2
shl ax,1 ; ax = ax*4
shl ax,1 ;ax = ax * 8
shl ax,1 ;ax = ax * 16
add ax,bx ; ax = ax*17
similary for A*23 = A*32 - (A*8+A)
mov bx,ax ; save a*1 into b
shl ax,1 ; ax=ax*2
shl ax,1 ; ax = ax*4
shl ax,1 ;ax = ax * 8
add ax,bx ; ax=ax*9
mov bx,ax ; save ax*9 into bx
shl ax,1 ;a=a*32
sub ax,bx ; ax=ax*32 - ax*9

