Write a counting program in MIPS assembly. The program should print the first sixteen powers of 2 beginning with 2^0 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).
Write a counting program in MIPS assembly. The program should print the first sixteen powers of 2 beginning with 2^0 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).
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
How to add space in between each power of 2 printed by this mips assembly
The output currently is:
124816326412825651210242048409681921638432768
When it needs to be:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768
-------
main:
li $t0, 16
li $t1, 0
li $t3, 1
loop:
beq $t1, $t0, end
li $v0, 1
move $a0, $t3
syscall
sll $t3, $t3, 1
addi $t1, $t1, 1
j loop
end:
li $v0, 10
syscall
jr $ra
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)