Welcome to Westonci.ca, where curiosity meets expertise. Ask any question and receive fast, accurate answers from our knowledgeable community. Get the answers you need quickly and accurately from a dedicated community of experts on our Q&A platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.

Write a series of instructions that will multiply eax by 18, using a combination of shift, mov, and add instructions

Sagot :

MOV EBX,EAX

SHL EAX,4

SHL EBX,1

ADD EAX,EBX these are the  series of instructions that will multiply eax by 18, using a combination of shift, mov, and add instructions.

STEPS:

1. Copy EAX into another register, say EBX

2. We know that shift left by 'n' bits results in multiplication with 2^'n' , so perform shift left operation of EAX by 4 bits ( results in multiplication of EAX with 16) and perform shift left operation of EBX by 2 bits(results in multiplication of EBX with 2)

3. Now add EAX and EBX which is the required answer ( Since, i*16 + i*2 equals to i*18 )

INSTRUCTIONS:

mov ebx,eax ; make copy

shl eax,4 ; eax * 16

shl ebx,1 ; ebx * 2

add eax,ebx ; answer

Learn more about EAX  here

https://brainly.com/question/15170747

#SPJ4