The mechanics of a branch


This question will test your abilities to understand the mechanics of a branch and how it interacts with the condition code register.
For this question assume the initial general purpose register values given below. The program counter (PC) is initialized to x3000. Perform the fetch, decode, execute cycle as the LC-3 would, up to (but not including) the HALT trap.
Once you've completely executed the given instructions (remember, do not execute the HALT), indicate the final values for the general purpose registers and the condition code register. The values you enter for the general purpose registers should be in 16 bit hexadecimal. So for example, if your answer is xC then your answer should look like x000C.
Initial Machine State
Register Initial Value
R0 x0001
R1 xFFFF
R2 xAB00
R3 x3000
R4 xF025
R5 x0000
R6 x7FFF
R7 x0040

PC x3000

Condition Code Register Initial Value
N 0
Z 1
P 0

Address Memory Contents (in binary)
x3000 0010 000 000000110
x3001 0000 100 000000001
x3002 1001 000 000 111111
x3003 1001 000 000 111111
x3004 0000 010 111111110
x3005 1001 000 000 111111
x3006 1111 0000 00100101
x3007 1111 1111 1111 1111
x3008 0000 0000 0000 0000
Final State After Execution (excluding executing the HALT)
Condition Code Register Final Value
N
Correct: Your answer is correct.
Z
Correct: Your answer is correct.
P
Correct: Your answer is correct.

Register Final Value
R0 x
R1 x
R2 x
R3 x
R4 x
R5 x
R6 x
R7 x

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: The mechanics of a branch
Reference No:- TGS0426735

Expected delivery within 24 Hours