Question
The Program will be written in MIPS using MARS. The Program will do as follows: 1. Read two program arguments: signed decimal numbers [-64, 63].
The Program will be written in MIPS using MARS. The Program will do as follows:
1. Read two program arguments: signed decimal numbers [-64, 63].
2. Print the user inputs.
3. Convert the ASCII strings into two sign-extended integer values.
a. Convert the first program argument to a 32-bit twos complement number, stored in register $s1.
b. Convert the second program argument to a 32-bit twos complement number, stored in register $s2.
4. Add the two integer values, store the sum in $s0.
5. Print the sum as a decimal to the console.
6. Print the sum as 32-bit twos complement binary number to the console.
7. (Extra credit) Print the sum as a decimal number expressed in Morse code.
a. Use a period (ASCII code 0x2E) for dots and a hyphen (ASCII code 0x2D) for dashes.
b. Insert a space (ASCII code 0x20) between characters.
c. Dont forget to print the Morse code for a minus sign if the number is negative!
Step 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