Choose the correct answerWhich of the following statements is true about Bitwise OR operator?OptionsShifts the bits of the number to the right and fills 0 on voids left as a resultReturns 1 if either of the bit is 1 else 0Returns 0 if either of the bit is 0 else 1Returns 1 if both the bits are 1 else 0.
Question
Choose the correct answerWhich of the following statements is true about Bitwise OR operator?OptionsShifts the bits of the number to the right and fills 0 on voids left as a resultReturns 1 if either of the bit is 1 else 0Returns 0 if either of the bit is 0 else 1Returns 1 if both the bits are 1 else 0.
Solution
The correct answer is "Returns 1 if either of the bit is 1 else 0". This is because the Bitwise OR operator (|) compares each bit of the first operand to the corresponding bit of the second operand. If either bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to
Similar Questions
Which of the following bitwise operators __ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.ORANDXORNOT
bitwise AND operation
Select the correct answerWhich of the following represents the bitwise AND operator?Options^&|!
Which bitwise operator is used to check if a bit is set to 1?&|~^
Select the correct answerWhich of the following operators is used for the bitwise OR assignment in C?Options||||=||=
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.