...
Computer-Networks
August 13, 2024
Computer-Networks
August 13, 2024

OOPS

Question 27

If x=5, y=2, then x^y equals (where, ^ is a bitwise XOR operator)

A
00000111
B
10000010
C
10100000
D
11001000
Question 27 Explanation: 
In XOR,
1 XOR 1 = 0
1 XOR 0 =1
0 XOR 0 = 0
0 XOR 1 = 1
So 5 in binary form is 00000101 and 2 in binary form is 00000010.
Hence 00000101 XOR 00000010 = 00000111.
Correct Answer: A
Question 27 Explanation: 
In XOR,
1 XOR 1 = 0
1 XOR 0 =1
0 XOR 0 = 0
0 XOR 1 = 1
So 5 in binary form is 00000101 and 2 in binary form is 00000010.
Hence 00000101 XOR 00000010 = 00000111.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!