subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
Emma is using an artificial intelligence system, which contains information on botany, to identify a type of plant from an image. what type of ai is emma using?
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
The a great imaginary circle, or reference line, around earth that is equally distant from the two poles and divides earth into the northern and southern hemispheres.
Answers: 1
You know the right answer?
Translate the following C program to Pep/9 assembly language. It multiplies two integers using a rec...
Questions
question
Mathematics, 18.11.2020 05:40
question
History, 18.11.2020 05:40
question
Mathematics, 18.11.2020 05:40
Questions on the website: 13722360