Ask Question
5 November, 09:11

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; }

+1
Answers (1)
  1. 5 November, 11:33
    0
    Data BP
Know the Answer?
Not Sure About the Answer?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers