Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Maragondon Branch
Maragondon, Cavite

Name: Salamat, Andre Agassi D. Date: June 01, 2021


Course/Year: BSEE-3 Subject Code: ECEN 20093 Microprocessors
System

Unit 1-4

1. The opcode for the branch instruction is at address 20 base 16. The relative address is 06 base 16•
After the branch instruction is executed, from what address will the next opcode be fetched?
- 2816, during the execution of the branch instruction, the program counter will be incremented
twice to 2216. When the relative address is added which is 06 16 is added, the new address becomes
2816.
2. The opcode for the branch instruction is at address 20 base 16. The relative address is F1 base 16•
After the branch instruction is executed, from what address will the next opcode be fetched?
- Like the answer in number 1, the program counter advanced to 22 16 before relative address is
added (F116). When this is added to the program count, the new address becomes 0001 0011 2. Thus,
the next opcode will be fetched from address 13 16.
3. Refer to the program in Figure 4-24. If the multiplier is 8 base 16 and the multiplicand is15 base 16,
how many times will the BEQ instruction be executed?
- Nine (9) times.
4. Refer to the program in Figure 4-26. What is the largest number that can be used as a dividend?
- 12710 or 0111 11112.
5. How could this program be modified so it could handle unsigned dividends up to 255 base 10?
- BMI instructions to BCS.
6. When this program halts, where will the remainder be located?
- At address 11 16.
7. Refer to the program in Figure 4-28. Assume that addresses 28 base 16, 29 base 16, and 2A base 16
contain 01, 09, and 08 respectively. How many times will 100 base 10 be added to address2B base 16?
- Once.
9. How many times will 10 base 10 be added?
- Nine (9) times.
10. Refer to the program in Figure 4-30. What is the purpose of the first four instructions?
- It’s clear the locations where the BCD equivalent will be stored.
11. The accumulator contains the number 7 base 10. If two ASLA instructions are executed, what
number will be in the accumulator?
- The first ASLA instruction multiplies the number by two (2), giving 14 10 and the second
ASLA doubles this number, giving 28 10.

You might also like