Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MIPS assembly language program that converts ASCII binary to decimal using MARS. It will do the following tasks. 1) Read a user entered

Write a MIPS assembly language program that converts ASCII binary to decimal using MARS. It will do the following tasks.

1) Read a user entered program argument (8 bit two's complement binary number) , then prints the user input

2) Convert the ASCII string into a sign-extended integer value, and store it in $s0.

3) Convert the sign-extended integer value to an ASCII string that displays the value as a hexadecimal number. Then print the ASCII string.

4) Covert the sign exteded integer value to an ASCII string that displays the value as a decimal number. Then print the ASCII string

Output Example

You entered the binary number:

11111100

The hex representation of the sign-extended number is:

0xFFFFFFFC

The number in decimal is:

-4

Notes:

For the user input, don't use syscall but use the program arguments which can be found in MARS settings and says "Program arguments provided to MIPS program."

When printing the decimal representation, do not you syscall service 1.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions