Ask Question
4 July, 09:38

Write a single 16-bit LC-3 instruction (in binary) that clears all the bits of R6 except the least significant two bits. In other words, after your instruction executes, bits 0 and 1 of R6 will be unchanged, and the rest of R6 will be zero.

+3
Answers (1)
  1. 4 July, 10:02
    0
    AND R6, R6, 0003.

    Explanation:

    Let's say we're taking the 0003 in decimal Hexa form.

    Which is to say, 0003 = 0000 0000 0000 0011.

    The AND operation can be performed between 0003 Hex number and R6, giving the last 2 bit the same as in R6 and leaving all bits as ' 0 ' in R6.

    Answer is: AND R6, R6, 0003.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a single 16-bit LC-3 instruction (in binary) that clears all the bits of R6 except the least significant two bits. In other words, ...” in 📗 Engineering if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers