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

Assume W0 = 0 times FFFF end W1 = 0 times BEEF ANSWER: ____ What is the value in

ID: 3858989 • Letter: A

Question

Assume W0 = 0 times FFFF end W1 = 0 times BEEF ANSWER: ____ What is the value in W1 after the instruct XOR, W0, W1, W1 is executed? a) 0 times 4110 b) 0 times BEEF c) 0 times FF10 d) 0 times 0010 e) none of the above Assume W0 = 0 times FFFF and W1 = 0 times BEEF ANSWER: ____ What is the value in W1 after the instruction XOR.B w0, w1, w1 is executed? a) 0 times 4110 b) 0 times BEEF C) 0 times FF10 d) 0 times 0010 e) none of the above Assume the C variable x is defined as uint16 x. ANSWER: _____ What C statement implements the equivalent of the assembly language instruction com x? a) x=x&0 times FFFF: b) x=x10 times FFFF: C) x=!x: d) x=~x: e) none of the above Assume the C variable x is defined as uint16 x. ANSWER: _____ Which of the following assembly language sequences correctly implement the operation x=x^10? a) mov #0 times 000A, WREG xor x b) mov.b #0 times 000A, WREG xor.b x C) mov # 0 times 0010, WREG xor x d) mov 10, WREG xor x e) none of the above The instruction bset SR, #2 affects which flag of the status register? ANSWER: _____ a) C b) Z c) OV d) N e) none of the above

Explanation / Answer

4) Given w0 =0xFFFF

w1=0XBEEF

Before performing XOR operation on hexadecimal numbers we need to convert into binary digits

0xFFFF = 1 1 1 1. 1 1 1 1. 1 1 1 1. 1 1 1 1

0xBEEF= 1 0 1 1. 1 1 1 0. 1 1 1 0. 1 1 1 1

the XOR operation on three operands is works as

(operand1 XOR operand2) XOR operand3 = Result

truth table for XOR is

0 0 0 = 0

0 0 1 = 1

0 1 0 = 1

0 1 1 = 0

1 0 0 = 1

1 0 1 = 0

1 1 0 = 0

1 1 1 = 1

then XOR W0,W1,W1 is performed as

1 1 1 1. 1 1 1 1. 1 1 1 1. 1 1 1 1

1 0 1 1. 1 1 1 0. 1 1 1 0. 1 1 1 1

1 0 1 1. 1 1 1 0. 1 1 1 0. 1 1 1 1

result is 1 1 1 1. 1 1 1 1. 1 1 1 1. 1 1 1 1 is converted in to hexadecimal oxFFFF

so answer is none of the above

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