Assume a sequence of assembly code as following: Add $s0, $t0, $t1 Sub $s1, $s2, $s0 Mult $s3, $s1, $s2 Div $s4, $t0, $t1 Lw $s3, 32($t0) Beq $s4, $s3, L1 Add $s0, $t0, $t1 Sub $s1, $s2, $s0 Mult $s3, $s1, $s2 Div $s4, $t0, $t1 L1: OR $s1, $s2, $s0 Add $s0, $t0, $t1 Sub $s1, $s2, $s0 If the address of first instruction (Add) is 2000, what is the address of Beq? If the Branch is taken ($s3=$s4) what will be the 7th instruction to execute and what is its address?
Assume a sequence of assembly code as following:
Add $s0, $t0, $t1
Sub $s1, $s2, $s0
Mult $s3, $s1, $s2
Div $s4, $t0, $t1
Lw $s3, 32($t0)
Beq $s4, $s3, L1
Add $s0, $t0, $t1
Sub $s1, $s2, $s0
Mult $s3, $s1, $s2
Div $s4, $t0, $t1
L1: OR $s1, $s2, $s0
Add $s0, $t0, $t1
Sub $s1, $s2, $s0
If the address of first instruction (Add) is 2000, what is the address of Beq? If the Branch is taken ($s3=$s4) what will be the 7th instruction to execute and what is its address?
![](/static/compass_v2/shared-icons/check-mark.png)
Before getting to the actual answer first talk about the process or the requirement of the question. We have a assembly program and we are provided with the initial address. So what we gona do.
Take the size of instruction and then multiple it with initial address to get Beq instructions. The further execution is shown on the next step:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![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)