Write an LC-3 assembly language to left shift the bits of R1 register by five po
ID: 3531461 • Letter: W
Question
Write an LC-3 assembly language to left shift the bits of R1 register by five positions. That is, every bit has to be moved over one bit slot left, and a zero is added at the empty rightmost space. For example: After a one position left shift: 0001101011101001 will become: 0011010111010010 In your own words, explain how your algorithm works. Write an LC-3 assembly language to left shift the bits of R1 register by five positions. That is, every bit has to be moved over one bit slot left, and a zero is added at the empty rightmost space. For example: After a one position left shift: 0001101011101001 will become: 0011010111010010 In your own words, explain how your algorithm works.Explanation / Answer
.ORIG X3000
AND R0, R0, #0
AND R1, R1, #0
AND R2, R2, #0
AND R3, R3, #0
AND R4, R4, #0
LEA R0, MSG1
PUTS
AGAIN GETC
ST R0, CHARS
OUT
AND R2, R2, R0
LD R3, NUMBERS
ADD R2, R2, R3
BRz STOP
BR AGAIN
STOP
LEA R0, MSG2
PUTS
LD R0, CHARS
OUT
HALT ;STOP PROGRAM
;*************************************
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.