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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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 

 

 

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education