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)
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.
Home » Computers & Technology » 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.