Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Help please, I think I\'m on the right track. I\'m trying to figure out how to d

ID: 3595365 • Letter: H

Question

Help please, I think I'm on the right track. I'm trying to figure out how to do this MIPS question. I am using MARS simulator.

Here is what I have already

1. A Company gives bonuses to its employees based on the total number of extra hours in week. If the employee works more than regular hours in week, s/he is eligible for the bonus. You will write a MIPS code that computes the extra payment of an employee. Therefore, you need to define the following variables in your data segment; bonus: amount of bonus that will be given to the employee hours: total hours that the employee works in a week extraPayment: extra payment amount that an employee will get. Initially, it is zero regularHours: total number of regular hours that an employee should work in a week. regularPayment: amount of payment that will be given to the employee for regularHours. extraPayment- (hours - regularHours)* bonus Payment regularPayment + extraPayment

Explanation / Answer

Here I have done the Mips code for calculating payment and extra_payment: