Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For these programming exercises, use only those instructions that have been discussed so far in these notes: add lhu sb addi lui sh addiu lw

For these programming exercises, use only those instructions that have been discussed so far in these notes:

add lhu sb
addi lui sh
addiu lw sll
addu mfhi sra
and mflo srl
andi mult sub
div multu subu
divu nor sw
lb or xor
lbu ori xori
lh

*Exercise 1

Your program has a data section declared as follows:

 .data .byte 12 .byte 97 .byte 133 .byte 82 .byte 236 

Write a program that adds the values up, computes the average, and stores the result in a memory location. Is the average correct? Put result in $10 in addition to storing in a memory location.

Hint: there are two easily-made errors in this program.

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago