Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

2. A branch instruction that uses relative addressing has a signed operand equal

ID: 3725297 • Letter: 2

Question

2. A branch instruction that uses relative addressing has a signed operand equal to-31, The instruction is 3-bytes long and is located at decimal 200 in memory. What is the address of the branch target? 3. How many times does an processor go to memory if it fetches and executes an instruction which uses memory indirect addressing if: A) The instruction does a computation using a single operand? B) The instruction is a branch. 4. Most modern processors do not support memory indirect addressing but nearly all of them support register indirect addressing. How does such a processor fetch data if the data address is in memory?

Explanation / Answer

Answer 2 :

Address of branch target is 172

Always remember, when a branch excutes, the value in the program counter is already incremented, therefore, the program counter is at 203 and not 200 when branch executes. Always remember, when a branch excutes, the value in the program counter is already incremented, therefore, the program counter is at 203 and not 200 when branch executes.

Now , 200+3 is the current value of PC, when branch exexutes, PC - 31 is computed which is 172, and PC is given value of 172

DUE TO COMPANY NORMS , WE ARE SUPPOSED TO ANSWER A SINGLE QUESTION FROM MULTIPLE POSTED QUESTIONS. KINDLY POST SEPARATELY TO GET ANSWERED.

RATE IT IF HELPS ELSE LET ME KNOW YOUR DOUBT. THANK YOU