Question: In this lab you are required to write a program in MIPS assembly language that should do the following tasks: TASK-1 Take one input value

In this lab you are required to write a program in MIPS assembly language that should do the following tasks: TASK-1 Take one input value from the user and check even/odd number. To find the remainder the div operator is used to divide by 2 and the remainder retrieved from the hi register. If the remainder is 0 the number is even, and 1 if it is odd. Hint for hi register: The HI and LO registers are 32-bit registers which hold or accumulate the results of a multiplication or addition. You have to use mfhi instruction. Display should be like this: Enter the number = 2 Result = Number is even
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
