Computer architecture and systems software


Computer Architecture and Systems Software

Question 1:

The following tasks consider designing and writing computer programs using assembly language. For each task, the program should produce valid results after loading and executing in the pcspim or xspim simulator. You should ensure that your programs are ecient and well commented.

A. Design and write an MIPS assembly program that accepts three input numbers and outputs the following numbers in sequence.

The largest of 3 inputs, the median of 3 inputs, the smallest of 3 inputs, the di erence between the largest and smallest”

You should attach the design of your program (in terms of a flow-chart diagram) and your MIPS codes in the submission le.

B. For the program in Part A., explain and demonstrate its execution in the laboratory sessions in Weeks 8, 9 or 10, and answer relevant questions.

C. GivenNas a user-entered positive number (i.e.,N >0), design and write one of the following MIPS assembly programs that depend on the last digit of your UoB number.

Last digit of Program speci cations

Your UoB number

Odd Add all odd numbers between 0 and N (inclusive) and display the result

Even Add all even numbers between 0 and N (inclusive) and display the result

Your program shall prompt the user to enter an input numberN. If the user enters a zero or negative number, then your program shall stop immediately.

You should attach the design of your program (in terms of a flow-chart diagram) and your MIPS codes in the submission le.

D. For the program in Part C., explain and demonstrate its execution in the laboratory sessions in Weeks 8, 9 or 10, and answer relevant questions.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Computer architecture and systems software
Reference No:- TGS01430337

Expected delivery within 24 Hours