Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume C variables i, j, and k are defined as given below. Which of the followin

ID: 3858988 • Letter: A

Question

Assume C variables i, j, and k are defined as given below. Which of the following assembly language sequences correctly implement the operation i=j-k? a) supsilonb i, j, k b) sub.b i, j, k c) mov.b k, WREG sub.b j, WREG mov.b WREG, i d) mov.b j, WREG sub.b k, WREG mov.b WREG, i e) none of the above Assume C variables i, j, and k are defined as given below. Which of the following assembly language sequences correctly implement the operation i = j + k ++? a) add i, j, k++ b) add.b i, j, k++ c) mov.b k, WREG add.b j, WREG mov.b WREG, i inc.b k d) mov j, WREG add k, WREG mov WREG, i inc k e) inc k mov j, WREG add k, WREG mov WREG, i Assume W0=0 times FF00 and W1=0 times DEAD What is the value in W0 after the instruction AND W0, W1, W0 is executed? a) 0 times 0000 b) 0 times DE00 C) 0 times FF00 d) 0 times 00AD e) 0 times FFAD

Explanation / Answer

1)

Ans: c

mov.b k,WREG // k is moved to WREG
sub.b j,WREG // j-k performs and result is stored in is WREG
mov.b WREG,i // Now result in WREG is moved to i


2)Ans: c


inc k // Performs increment of k
mov j,WREG // j is moved to WREG
add k,WREG // adds j value that is stored in WREG to k
mov WREG,i // The result is moved ti i

3) Ans: d)0x00AD

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote