Question

1. Write a MARIE program that can implement a sum of two products, i.e. using MARIE...

1. Write a MARIE program that can implement a sum of two products, i.e. using MARIE program to calculate 13*35 + 27*18 (* means multiply) and store the result to a variable Sum.

Hint: e.g. following code can be used to initialize the variables A, B, C and D, in which A is 13, B is 35, C is 27 and D is 18
A,       DEC   13    /one of the four input numbers: 13
B,       DEC   35    /one of the four input numbers: 35
C,       DEC   27   /one of the four input numbers: 27
D,       DEC   18    /one of the four input numbers: 18

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1oolol 10oll loloo 10000 Load A bool MUL B Stone Sum Load c MULD ADD SUM 10110 Store Sum 101/A, DEC 13 1000 B, DEC 35 lololl

Add a comment
Know the answer?
Add Answer to:
1. Write a MARIE program that can implement a sum of two products, i.e. using MARIE...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. Write a Marie program that accepts two positive (inputs) two integers and outputs the sum...

    2. Write a Marie program that accepts two positive (inputs) two integers and outputs the sum of both of the integers and all the numbers in between Write a Marie program that determines the largest of a series of positive integers provided by a user. The user will enter a -1 when she is finished. Up to 10 numbers will be provided by the user. Write a Marie program that accepts two positive integers, multiples them by repeated addition, and...

  • Write a MARIE program to implement one round of rock paper scissors game. Your program should...

    Write a MARIE program to implement one round of rock paper scissors game. Your program should represent the three moves ‘rock’, ‘paper’ and ‘scissors’ with numbers 1, 2 and 3 respectively. When the program is run, there should be two input prompts, one after the other, to ask for player 1’s and player 2’s moves (a number 1, 2 or 3). Then the program would compare both numbers and apply the following rules to work out the winner. Paper beats...

  • Write an assembly program to add four hexadecimal numbers A, B, C, D (i.e. these are...

    Write an assembly program to add four hexadecimal numbers A, B, C, D (i.e. these are literal values) and then store the result in address 0x30. (PIC 18)

  • Marie Assembly Language

    Assembly (MARIE), how can I output my input variables on exit?I am trying to compose an assembly (MARIE) program to output my input variables **on exit**. I am triggering an exit when . (period) is entered. I am transforming the input, and to later display the new value on exit.Some context, FOO will return SBB when ran through Rot-13However, my program is displaying the output on each iteration of my loop. I am instead wanting to not display anything, until . is entered...

  • I need help with this C++ assignment. Create a program which will implement the sum of...

    I need help with this C++ assignment. Create a program which will implement the sum of the numbers between 1 and n where n is an integer. When completed, the program will allow the user to input a positive integer (n) then the program will add all numbers between 1 and n (including n) and output the sum. For example, if the user enters 8 then the program will sum the numbers 1 through 8 and will output the sum....

  • 1- Correct the syntax errors in the following program, and rewrite the program so that it...

    1- Correct the syntax errors in the following program, and rewrite the program so that it follows the proper style conventions. What does the program do? (Write it out as a comment). (10 pts) #include <stdio.h> int main() {/* * Calculate and display the difference of two values *) int X, /* first input value */ x, /* second input value */ sum; /* sum of inputs */ X=9, x=7.5 X + x = sum; printf("%d + %d = %d\n";...

  • NEED HELP WITH THIS . Write a MARIE assembly language program that would simulate calling and exe...

    NEED HELP WITH THIS . Write a MARIE assembly language program that would simulate calling and executing the following C function, as shown below: z = someFunction(a, b); where z, a and b are main( ) program variables, and the values stored in a and b are input by the user. The value stored in z will be output. Did your program execute correctly? This is the code for the function: int someFunction(int x, int y) { return 3 *...

  • Write a complete C program that does the following: . o Declare a and b as...

    Write a complete C program that does the following: . o Declare a and b as character variables. Initialize a to this value: 127 o Declare c as an unsigned character variable o Multiply a by 2 and store the result in variable b. o Multiple a by 2 and store the result in variable c. Print the values of a, b, and c. Use the %d specifier in each case. Declare d as an integer variable. Initialize d to...

  • Write MIPS code for each of the following instructions, Your assembly should implement the C code...

    Write MIPS code for each of the following instructions, Your assembly should implement the C code directly – i.e.,do not ’optimize’ the C code to change the order of operations or reduce computations. Use commands only like add, sub, lw, sw, immediate Part 1. x = 3-13*x; Do not use multiply. One way of doing the multiply without a multiply instruction is by using many add instructions (x+x+...+x). For this problem, you should do it with fewer additions. Hint: We...

  • Question 1 (4 mark): Implement a program with two classes according to the following UML diagram:...

    Question 1 (4 mark): Implement a program with two classes according to the following UML diagram: College -firstLab Student: StudentAccount - secondLab Student: StudentAccount +main (String (1) : void +College (String, String, int, int) : +printStudents(): void contains StudentAccount -name: String -studentNumber: int StudentAccount (String, int): +getName(): String +getStudentNumber(): int 2 REQUIREMENTS • The constructor College (String, String, int, int) shall create two component objects of type StudentAccount, i.e., the first lab student and the second lab student, and initialize...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT