Ask Question
9 March, 20:26

Translate the following C program to Pep/9 assembly language. It multiplies two integers using a recursive shift-and-add algorithm. mpr stands for multiplier and mcand stands for multiplicand. A recursive integer multiplication algorithm#include int times (int mpr, int mcand) { if (mpr = = 0) { return 0; } else if (mpr % 2 = = 1) { return times (mpr / 2, mcand * 2) + mcand; } else { return times (mpr / 2, mcand * 2); }}int main () { int n, m; scanf ("%d %d", &n, &m); printf ("Product: %d/n", times (n, m)); return 0; }

+4
Answers (1)
  1. 9 March, 22:55
    0
    Data BP
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Translate the following C program to Pep/9 assembly language. It multiplies two integers using a recursive shift-and-add algorithm. mpr ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers