Answered step by step
Verified Expert Solution
Question
1 Approved Answer
answer in assembly code please, not mips Write a program that can evaluate ONE mathematical expression. The mathematical expression could be addition, subtraction, multiplication or
answer in assembly code please, not mips
Write a program that can evaluate ONE mathematical expression. The mathematical expression could be addition, subtraction, multiplication or division. The input is just 1 line. The output is the result of that line. Look below for examples: for the input: 1 + 1 The program should output 2 for input 2*2 the program should output 4 for input 4/2 the program should output 2 For invalid operators, you should display "Invalid Operator" message. So for this input: 5$ 6 Invalid Operator ASSUMPTIONS YOU MUST FOLLOW: . When applying division, only division that results in NO REMAINDER will be used. So do NOT worry about remainder. For example, I'll test your code with 5/1 or 6/2 or 8/2 Output is ALWAYS 9 or less. I will NOT test your code with any numbers that result in a number higher than 9 . Always read numbers in 2 bytes. with multiplication, I will only test small numbers where the result is 9 or less. So I will only multiply 2*2 or at most 4*2. I will NOT test multiplication where the result is more than 9Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started