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

OOPS

Question 30

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

A
00000111
B
10000010
C
10100000
D
11001000
Question 30 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 30 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.

Leave a Reply

Your email address will not be published. Required fields are marked *