C Programming - Bitwise Operators - Discussion

Discussion Forum : Bitwise Operators - Yes / No Questions (Q.No. 5)
Bitwise | can be used to set multiple bits in number.
Answer: Option
No answer description is available. Let's discuss.
4 comments Page 1 of 1.

Adil said:   7 years ago
Is it valid for all the binary numbers?

Anand r k said:   1 decade ago
Oh thanks peeyush.

Peeyush said:   1 decade ago
You can set them by doing OR operation.

If you have bits: 0000

Then you can set all of them using 1111 and bitwise | operation.

0000 | 1111 = 1111

Sathya said:   1 decade ago
How to set multiple bits in bitwise. Any one explain me.

Post your comments here:

Your comments will be displayed after verification.