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

9.1 if x = 0x36 then which of the following statements is incorrect a) if y = 0x

ID: 3821786 • Letter: 9

Question

9.1 if x = 0x36 then which of the following statements is incorrect

a) if y = 0x42 then x | y is 0x76

b) if y = 0x12 then x & y is 0x2

c) if y = 0x42 then x & y is 0x2

d) if y = 0x41 then x & y is 0x0

e) All statement are correct

9.2. if x = 0x25 then which of the following statements is correct

a) if y = x | (1<<1) then y is 0x26

b) if y = x << 1 then y is 0x4A

c) if y = x & 0x37 then y is 0x35

d) if y = x | 0x37 then y is 0x35

e) All of the above statements are incorrect

Explanation / Answer

Here is the code explained for the 9.1

9.1 if x = 0x36 then which of the following statements is incorrect
x = 0x36 = 0011 0110
a) if y = 0x42 then x | y is 0x76
y = 42 = 0100 0010
Now, x | y =
   0011 0110
|   0100 0010
   0111 0110   = 0x76. Therefore, is true.
b) if y = 0x12 then x & y is 0x2
y = 12 = 0001 0010
Now x & y =
   0011 0110
&   0001 0010
   0001 0010 = 0x12. Therefore, is false.
c) if y = 0x42 then x & y is 0x2
y = 42 = 0100 0010
Now x & y =
   0011 0110
&   0100 0010
   0000 0010 = 0x2. Therefore, is true.  
d) if y = 0x41 then x & y is 0x0
y = 41 = 0100 0001
   0011 0110
&   0100 0001
   0000 0000 = 0x0. Therefore, is true.  
e) All statement are correct

And the answer is: B.