Write a counting program in MIPS assembly. The program should print the first sixteen powers of 2 beginning with 20 with a space between each value. The output of the program should be exactly as follows:   1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768  Additional requirements for this problem: You must use a logical shift operation in your implementation. You must use a loop (i.e., a conditional branch that causes program instructions to repeat).

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.6: Nested Loops
Problem 4E
icon
Related questions
Question

Write a counting program in MIPS assembly. The program should print the first sixteen powers of 2 beginning with 20 with a space between each value. The output of the program should be exactly as follows:

 

1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 


Additional requirements for this problem: You must use a logical shift operation in your implementation. You must use a loop (i.e., a conditional branch that causes program instructions to repeat).

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr