Question: When coding in LC-3, there are many ways to check that two registers (say R1 and R2) values are equal. Which statement below is true?
When coding in LC-3, there are many ways to check that two registers (say R1 and R2) values are equal. Which statement below is true?
| Your answer: | |
|---|---|
| You use the AND instruction between the two registers. The outcome is 1 if they are equal and 0 otherwise. From there you use a simple conditional branch instruction | |
| You use the Division instruction DIV between register R1 and R2. If the outcome is 1 then they are equal. From there you use a simple conditional branch instruction
| |
| You store their difference in a register and compare the register content to zero using the BRz instruction
| |
| You use the CR (Compare Register) instruction which directly compares two register values | |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
