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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!