Question: The following LC-3 instructions execute starting from the point shown by the comment. 1 2 3 4 5 6 7 8 9 10 11 12

The following LC-3 instructions execute starting from the point shown by the comment.

1

2

3

4

5

6

7

8

9

10

11

12

13

; start LC-3 execution here

0101 001 001 1 00000

0101 011 011 1 00000

0001 001 001 1 01100

0001 011 011 1 00101

1001 010 001 111111

1001 100 011 111111

0101 010 010 0 00 011

0101 100 100 0 00 001

1001 010 010 111111

1001 100 100 111111

0101 010 010 0 00 100

1001 010 010 111111

; end LC-3 execution here

After the code reaches the end of the code (the last comment), what bits are held in R1? And in R2? And in R3? And in R4?

Lines 1-4 initialize the input registers, while lines 5-12 generate the output of the function, and store the result in register R2. What Boolean function is this code trying to implement? Specifically, identify the two input registers and the Boolean function implemented:

R2 R? (mystery Boolean function?) R?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!