Question

Initialize register $t0 (will hold the sum) to zero. Then add 409610 to $t0 sixteen times. You dont know how to loop yet, so
Write the program in MIPS

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MIPS program
addi $t0, $zero, 0   //$t0 = 0
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096
addi $t0, $t0, 0x1000   //$t0 = $t0 + 4096

addi $t1, $zero , 0x1000 //$t1 = 4096
slli $t1, $t1, 4 //$t1 = 16*4096

addi $t2, $zero , 0x1000 //$t2 = 4096
add $t2, $t2, $t2   //$t2 = 2*4096
add $t2, $t2, $t2   //$t2 = 4*4096
add $t2, $t2, $t2   //$t2 = 8*4096
add $t2, $t2, $t2   //$t2 = 16*4096

Add a comment
Know the answer?
Add Answer to:
Write the program in MIPS Initialize register $t0 (will hold the sum) to zero. Then add...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need to write a MIPS assembly program that finds the minimum and maximum and sum of...

    Need to write a MIPS assembly program that finds the minimum and maximum and sum of a stored array. It also finds the locations of the minimum and maximum. The interaction between the main program and the function is solely through the stack. The function stores $ra immediately after being called and restores $ra before returning to main. The main program reserves a static C like array (index starts from 0) of 10 elements and initializes it. The maximum should...

  • 1. Write a program in Assembly language using MIPS instruction set that reads two integer numbers...

    1. Write a program in Assembly language using MIPS instruction set that reads two integer numbers from the user named as start and end number and finds out all the prime numbers between start and end (including start and end). Your program should do the validation of both the numbers as follows: i. start number must be smaller or equal to the end number. ii. Both numbers must be positive. iii. The maximum value for the end number is 10000...

  • 4. Translate 10*2to exactly 8-digit hexadecimal number. Answers: If the cost for all RAM chips to...

    4. Translate 10*2to exactly 8-digit hexadecimal number. Answers: If the cost for all RAM chips to utilize the maximum memory space of the MIPS architecture is SI dolloars, how much will it cost, approximately, to implement the maximum memory space of the a 64-bit computer architecture Answer: Approximately 6 billions Filli an integer. No fraction.) 6. Fill in the missing pieces of the MIPS assembly codes that translate the following C codes int A[1001. BI 1001; B12] = h +...

  • High-level computer languages are created to be understood by humans. As a result, the keywords and...

    High-level computer languages are created to be understood by humans. As a result, the keywords and the commands of these languages are easy to understand. Machine languages are harder to understand and operate. For this assignment, you should assume that the memory cells at addresses F0 to F9 are in the machine described in FIGURE 1, and that it contains the hexadecimal bit patterns described in the following table. Note: Each memory address contains 2 values that must be used...

  • Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped...

    Group Project 1 The Micro-1 Processor Simulation <Micro-1 Computer> Here's the organization of a computer equipped with a Micro-1 processor Memory contains an array of integer cells: int cell[] = new int[CAP]; where CAP is the capacity of memory. Initially this is set to 256. Internally, the Micro-1 processor is equipped with eight 32-bit data/address registers and two 32 bit control registers: PC, the program counter, contains the address of the next instruction to execute. IR, the instruction register, contains...

  • i need help with a mips program to to covert roman numerals to real numbers Lab 4: Roman Numeral Conversion Part A: Due...

    i need help with a mips program to to covert roman numerals to real numbers Lab 4: Roman Numeral Conversion Part A: Due Sunday, 19 May 2019, 11:59 PM Due Friday, 24 May 2019, 11:59 PM Part B: Minimum Submission Requirements Ensure that your Lab4 folder contains the following files (note the capitalization convention): o Diagram.pdf o Lab4. asm O README.txt Commit and push your repository Lab Objective In this lab, you will develop a more detailed understanding of how...

  • Program 7 File Processing and Arrays (100 points) Overview: For this assignment, write a program that...

    Program 7 File Processing and Arrays (100 points) Overview: For this assignment, write a program that will process monthly sales data for a small company. The data will be used to calculate total sales for each month in a year. The monthly sales totals will be needed for later processing, so it will be stored in an array. Basic Logic for main() Note: all of the functions mentioned in this logic are described below. Declare an array of 12 float/doubles...

  • For this c++ assignment, Overview write a program that will process two sets of numeric information....

    For this c++ assignment, Overview write a program that will process two sets of numeric information. The information will be needed for later processing, so it will be stored in two arrays that will be displayed, sorted, and displayed (again). One set of numeric information will be read from a file while the other will be randomly generated. The arrays that will be used in the assignment should be declared to hold a maximum of 50 double or float elements....

  • Program 7 Arrays: building and sorting (100 points) Due: Friday, October 30 by 11:59 PM Overview...

    Program 7 Arrays: building and sorting (100 points) Due: Friday, October 30 by 11:59 PM Overview For this assignment, write a program that will calculate the quiz average for a student in the CSCI 240 course. The student's quiz information will be needed for later processing, so it will be stored in an array. For the assignment, declare one array that will hold a maximum of 12 integer elements (ie. the quiz scores). It is recommended that this program be...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT