Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is the immediate value of beq needed to calculate the target address (99900) if the branch is taken? Remember: PC-relative address = (PC +
What is the immediate value of beq needed to calculate the target address (99900) if the branch is taken?
Remember: PC-relative address = (PC + 4) + (Offset x 4)
(Decimal)
Start: | jal AVERAGE | 99900 | 3 | |||||
|
|
|
|
|
|
|
| |
Loop: | sll $t1, $s3, 2 | 100000 | 0 | 0 | 19 | 9 | 2 | 0 |
| add $t1, $t1, $s7 | 100004 | 0 | 9 | 23 | 9 | 0 | 32 |
| addi $s0, $t1, -5 | 100008 | 8 | 9 | 16 | |||
| lw $t0, 0($t1) | 100012 | 35 | 9 | 8 | 0 | ||
| bne $t0, $s5, Exit | 100016 | 5 | 8 | 21 | |||
| addi $s3, $s3, 1 | 100020 | 8 | 19 | 19 | 1 | ||
| beq $s3, $t3, Start | 100024 | 4 | 19 | 11 | ??????????????? | ||
| j Loop | 100028 | 2 | |||||
|
|
| ||||||
Exit: | 100420 |
| ||||||
|
|
| ||||||
AVERAGE: | 101000 |
|
(-)
Offset value =
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started