+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following bitwise operations will you use to set a particular bit to 1?

(a) OR

(b) AND

(c) XOR

(d) NOR

This key question is from Bit Array topic in division Arrays Types of Data Structures & Algorithms I

I got this question in an online interview.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
Correct answer is (a) OR

The best explanation: 1 OR 1 = 1, 0 OR 1 = 1, any bit OR’ed with 1 gives 1.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...