C Programming - Bitwise Operators - Discussion
Discussion Forum : Bitwise Operators - Yes / No Questions (Q.No. 5)
5.
Bitwise | can be used to set multiple bits in number.
Discussion:
4 comments Page 1 of 1.
Adil said:
8 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
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.
(1)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers