JAVA Programming :: Basic Concepts - Discussion
Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion
22 / 64
Choose the correct option.
What is the result of evaluating the expression 14 ^ 23. Select the one correct answer.
A25
B37
C6
D31
E17
Answer: Option (Login/Signup)
Show Explanation
14 in binary can be represented as = 0000 1110
23 in binary can be represented as = 0001 0111
Therefore, 14 ^ 23 = 0001 1001
which is equal to 25.
Asked In ::
STEP-BY-STEP
^ is the symbol for XOR operator, which results in 0 when the bits are same, and 1 when the bits are different.
14 in binary can be represented as = 0000 1110
23 in binary can be represented as = 0001 0111
Therefore, 14 ^ 23 = 0001 1001
which is equal to 25.
Read Full Answer
Report Error
Please Login First Click Here