Document

You might also like

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

 What happens when RA contains a value equal to zero or less?

Branch is not taken as BRGZ instruction demands RA > 0 for branch to be taken.

 When RA > 0 and AD > 0?


Branch is taken as RA > 0 and we move forward to instruction as AD>0.

 When RA > 0 and AD < 0?


Branch is taken as RA > 0 and we move back to instruction as AD<0. After moving back, the
program get into a loop.

 When RA > 0 and AD = 0?


Branch is taken as RA > 0 and the program get stuck as AD=0.

 Do the other functions of the program counter still work properly? (PC  PC + 1, PC  R[SA])
Yes. All the functions of F2 are working.
Figure 1 Simulation waveform with branch instructions highlighted

You might also like