Question

For some reason nobody out there answers this question, Please please help me with this, Let me know if any further info will be needed.

Create a MARIE assembly program which inputs two integers, X and Y, computes 3X + 4Y, and outputs the result. Requirements 1.Sample Output When 4 and 6 are entered MARIE Simulator Symbol Map Help OUTPUT AC | 0024|Hex ▼ IR | MARI 013 |Hex ▼ 36 7000 He

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

Hi, Please check the code below and the snapshots of the output to understand the solution better. Comments are inserted as and where necessary.

Code:

/ Multiplication Using Subroutines
/ Prompt user to type in integers
INPUT
Store X/Get the Value of X
INPUT
Store Y/Get the Value of Y
JnS MultiplyExpression/Call the subroutine to calculate the multiplication
Load resX/Load the final result stored in resX
Output/Output the result
Halt

X, DEC 0/Initial Value of X
Y, DEC 0/Initial Value of Y
resX, DEC 0/Initial Value of resX
resY, DEC 0/Initial Value of resY
one, DEC 1/Variable to use to decrement the counter
countX, DEC 3/Since the expression is 3X
countY, DEC 4/Since the expression is 4Y

/Start the subroutine MultiplyExpression
MultiplyExpression, HEX 000 / Used for storing return address
/ Loop for performing iterative addition of X
loopX, Load resX
Add X/Perform Multiplication though repetitive addition
Store resX

Load countX
Subt one/Decrement the counter by 1
Store countX

Skipcond 400 / have we completed the multiplication?
Jump loopX / no; repeat loop
/ yes, so exit the loop

loopY, Load resY
Add Y
Store resY

Load countY
Subt one
Store countY

Skipcond 400 / have we completed the multiplication?
Jump loopY / no; repeat loop
/ yes, so exit the loop

/Calculate the addition of products 3X and 4Y
Load resX
Add resY/Add the result of Y to X
Store resX/Stores the final result of 3X + 4Y
/ Exit subroutine MultiplyExpression
JumpI MultiplyExpression

Output:

PS: If you are satisfied with the answer, please take a couple of seconds to rate the answer. Thanks. If you do have any questions/comments, do let me know. I will be glad to help. :)

> Given the below Function:
F(x,y,z)= (y ̅+x).(y+z)+xyz
Draw the combinational circuit that directly implements the Boolean expression:
For what values of x, y, and z the output (F) will be 0? Justify your answer using a truth table.

Basim Alakhli Sat, Oct 30, 2021 6:04 PM

> Given the below Function:
F(x,y,z)= (y ̅+x).(y+z)+xyz
Draw the combinational circuit that directly implements the Boolean expression:
For what values of x, y, and z the output (F) will be 0? Justify your answer using a truth table.

Basim Alakhli Sat, Oct 30, 2021 6:22 PM

Add a comment
Know the answer?
Add Answer to:
For some reason nobody out there answers this question, Please please help me with this, Let...
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
  • Hi please help me with this zybooks question asap. Thanks 4.17 Chapter 4 Program: Sum of...

    Hi please help me with this zybooks question asap. Thanks 4.17 Chapter 4 Program: Sum of Numbers/C++ program Write a C ++ program that asks the user for a positive integer value by prompting "Enter a positive integer number: ", read in that number, then use a loop to get the sum of all the integers from 1 up to the number entered. For example, if the user enters 50, the loop will find the sum of 1, 2,3, 4…50....

  • C++ program to convert between decimal, hexadecimal, and octal. Please Help!!

    Hi, I need help writing a program that reads in data (hex, octal or decimal values) from an input file and outputs the values in to another base form (hex, octal,decimal) one line at a time depending on the formatting characters provided by the input file. I am posting the code requirements below and an example of what theinput file will look like and what should be output by the program. I only need the one .cpp program file. Thanks...

  • Please help me create this CLI CPU Scheduling Simulator in java: First Come First Serve (FCFS)...

    Please help me create this CLI CPU Scheduling Simulator in java: First Come First Serve (FCFS) Round Robin (RR) Process information The process information will be read from an input file. The format is: pid arrival_time burst_time All of fields are integer type where: pid is a unique numeric process ID arrival_time is the time when the task arrives in the unit of milliseconds burst_time the is the CPU time requested by a task, in the unit of milliseconds The...

  • Please help me with the following C Programming project. I am providing the code I used...

    Please help me with the following C Programming project. I am providing the code I used which needs to be reworked to add the following requirements. Here is my code #include<stdio.h> char input; int main() { int i = 0; while (true){ scanf_s("%c", &input); if (input == 'X') break; printf("%c", input); } return 0; } Here are the requirements for the code plus and additional note what the code should have. Goals Understand the ASCII representation of character values. Understand...

  • I'm having trouble writing this code, can some help me? Step 1: Capturing the input The...

    I'm having trouble writing this code, can some help me? Step 1: Capturing the input The first step is to write a functionGetInput()that inputs the expression from the keyboard and returns the tokens---the operands and operators---in a queue. You must write this function. To make the input easier to process, the operands and operators will be separated by one or more spaces, and the expression will be followed by #. For example, here’s a valid input to your program: 6...

  • Please Help in C#, Let me know if you have any questions. Please make sure the...

    Please Help in C#, Let me know if you have any questions. Please make sure the program passes the checks Checks: Question: My code works, it just this needs to be added there which I don't know what I need to do.    In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output...

  • QT Spim question. Program and answer already given please explaine it. Please explain the reason why...

    QT Spim question. Program and answer already given please explaine it. Please explain the reason why each instruction was used throughout the program step by step given the prompt, what is its purpose to achive the goal asked in the prompt, why is written in that order. Please not just write to the side what each instruction means in words like load $t0 to $t1. I want to understand the program thoroughly. Thanks in advance Previous information needed to solve...

  • Please help me the JAVA program - Choose Your Operation Write a program that uses a...

    Please help me the JAVA program - Choose Your Operation Write a program that uses a WidgetView object to do the following: Generate two random integers between 1 and 9 (inclusive). Name one of them x, the other y. Display them to the user using JLabel objects. Create a JLabel object displaying the text "Enter an operation number." Create a JTextField for the user's input. Create a JButton displaying the text "Press here when you've entered your operation." Use addAndWait...

  • Can somebody help me with this assignment. I will highly appreciate. Also, please display the output...

    Can somebody help me with this assignment. I will highly appreciate. Also, please display the output as well. I need to use JAVA to to write the program. This is the sample output provided by my professor. HOME WORK: due 09.17.2019 (Rational Numbers) Create a class called Rational for performing arithmetic with fractions. Write a program to test your class. Use integer variables to represent the private instance variables of the class- the numerator and the denominator. Provide a constructor...

  • Hello, If anyone would be so kind as to help me out with a solution in...

    Hello, If anyone would be so kind as to help me out with a solution in either Java or C++ please and thank you !!! CS 278 Lab3: Quantified statements Write a program that does the following. It should take as a user input ten different integers and store them in a length ten integer array (with no repeated entries). The domain D is the set of entries in this array. Recall that if the domain is a finite set...

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