Assume the base register contains 32856. The program counter is curre...
Effective Address [EA] = [Base register] + Relative value
= 32856 + (-30) = 32826
PC = 32826
Branch address will be 32826.
View all questions of this test
Assume the base register contains 32856. The program counter is curre...
Understanding Base Register Addressing
In base register addressing mode, the effective address of the operand is calculated by adding a constant value (offset) to the content of the base register. In this case, we need to determine the branch address based on the given parameters.
Parameters Given
- Base Register: 32856
- Program Counter (PC): 25687
- Address Field of Jump Instruction: -30
Calculating the Branch Address
1. Identifying the Effective Address:
- The address field of the jump instruction is -30, which indicates a backward jump (or a negative offset).
2. Calculating the Effective Address:
- The effective address (branch address) is computed by adding the offset to the base register.
- Effective Address = Base Register + Offset
- Effective Address = 32856 + (-30)
- Effective Address = 32856 - 30
- Effective Address = 32826
Conclusion
The calculated branch address is 32826, which corresponds to option 'A'. This demonstrates how base register addressing mode works, allowing the program to access a specific memory location based on the calculated effective address.