1. Your program should be able to take one integer values from user input until you enter 0 and program should end if user types in an integer 0. (The prompt should be Enter an integer: ) 2. Store the integer into $t5 and multiply the number by 8 using shift operations (Do not use multiplication). And then print the values of bit number 6 to 10 of $t5. (The rightmost bit is bit 0) 3. You need give detail comments to explain what is happening in the code. The level of detail will be graded. 4. You need to show the result screens for at least five pairs of numbers including negative numbers. 5. You need to use the newlines spaces properly so that the output prints in orderly manner. Your output should look like: The number you entered: After it is multiplied by 8: The bits [6-10] are: (there should be one space between each bit value) Note: Your program first receives user input (integer) and stores it in $t0. Print the entered number (decimal value) Multiply the number in $t0 and print the number (decimal value) Print the value of Bit #6, 7, 8, 9, and 10 of $t5. (The output should look like: 0 1 1 0 0 ) Please make sure the output is correct. this is an example of the output when you enter an integer. Enter an integer: **** user input : 8 The number you entered: 8 After it is multiplied by 8: 64 The bits [6-10] are: 10000
1. Your program should be able to take one integer values from user input until you enter 0 and program should end if user types in an integer 0.
(The prompt should be Enter an integer: )
2. Store the integer into $t5 and multiply the number by 8 using shift operations (Do not use multiplication). And then print the values of bit number 6 to 10 of $t5. (The rightmost bit is bit 0)
3. You need give detail comments to explain what is happening in the code. The level of detail will be graded.
4. You need to show the result screens for at least five pairs of numbers including negative numbers.
5. You need to use the newlines spaces properly so that the output prints in orderly manner. Your output should look like:
The number you entered:
After it is multiplied by 8:
The bits [6-10] are: (there should be one space between each bit value)
Note:
Your program first receives user input (integer) and stores it in $t0.
Print the entered number (decimal value)
Multiply the number in $t0 and print the number (decimal value)
Print the value of Bit #6, 7, 8, 9, and 10 of $t5. (The output should look like: 0 1 1 0 0 )
Please make sure the output is correct.
this is an example of the output when you enter an integer.
Enter an integer: **** user input : 8
The number you entered: 8
After it is multiplied by 8: 64
The bits [6-10] are: 10000
Step by step
Solved in 4 steps with 2 images