Question: Assembly Programming The task for this practical is to write an assembly program which can multiply two integer numbers. However, the program should not use
Assembly Programming
The task for this practical is to write an assembly program which can multiply two integer numbers. However, the program should not use the mul or imul instruction to accomplish this. Instead, the program should perform the multiplication using the following multiplication. The multiplication of two numbers is achieved using shift operations and simple addition. The next sections detail how the multiplication works and define the requirements of the program. Make sure that ALL program requirements are implemented as stated.
Two numbers a and can be multiplied by repeatedly halving discarding remainders and doubling see table below The value of is added to the result if the value in is odd. The procedure stops when a reached In the shown example we compute with and is odd and therefore Halving results in when discarding the remainder. Doubling results in is even and therefore we do not add to the result The process continues until we reach and is odd and therefore a has reached and the algorithm terminates leaving the multiplication result of
tableab
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
