Determine the result of executing each of the following assembly instructions. I
ID: 3757637 • Letter: D
Question
Determine the result of executing each of the following assembly instructions. Identify the results register and the value it holds (e.g., R1=0timesF2). To keep these example values simple enough to work with manually, assume you have an 8-bit microcontroller with 8-bit ALU and 8-bit CPU registers. Assume the initial register values below for each instruction (do not carry your results into the next instruction). Express your answer in both binary and hex. R0 = 2 0000.0000 (0times00) R1 = 2_1111.1111 (0timesFF) R2 = 2_0000.1111 (0times0F) R3 = 2_1111.0000 (0timesF0) ANDS R3, R2 EORS R1, R3 ORRS R0, R3 BICS R2, R3 BICS R1, R2 LSLS R1,R2, #0times4 ASRS R3, #2 LSRS R1, R0Explanation / Answer
Solution :
a) Register ANDS has value 0000.0000
b) Register EORS has value 1111.1111
c) Register ORRS has value 1111.0000 (16 bit)
d) Register BICS has value 1111.0000
e) Register BICS has value 0000.1111
f) Register LSLS has value 1111.1111 (16 bit)
g) Register ASRS has value 111100.00 (as permitted shifts to 1 - 32)
h) Register LSRS has value 000000.00 (as permitted shifts to 1 - 32)
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.