[Solved] Which of the following bitwise operations will you use to set a particular bit to 1?

Which of the following bitwise operations will you use to set a particular bit to 1?

a) OR
b) AND
c) XOR
d) NOR

Answer: a
Explanation: 1 OR 1 = 1, 0 OR 1 = 1, any bit OR’ed with 1 gives 1.

Comments