Suppose x and y are two integer variables having values 0x5AB6 and 0x61CD…
2004
Suppose x and y are two integer variables having values 0x5AB6 and 0x61CD respectively. The result (in hex) of applying bitwise operator AND to x and y will be:
- A.
0x5089
- B.
0x4084
- C.
0x78A4
- D.
0x3AD1
Attempted by 57 students.
Show answer & explanation
Correct answer: B
To find the bitwise AND of 0x5AB6 and 0x61CD, align the hexadecimal digits. Perform AND operations on each corresponding nibble: 5 & 6 = 4, A & 1 = 0, B & C = 8, and 6 & D = 4. Combining these results yields the final hexadecimal value of 0x4084.
A video solution is available for this question — log in and enroll to watch it.