C# Programming - Operators - Discussion
Discussion Forum : Operators - General Questions (Q.No. 14)
14.
Which of the following statements is correct about Bitwise | operator used in C#.NET?
Discussion:
5 comments Page 1 of 1.
Abhishek yadav said:
1 decade ago
@Kalaiselvan here is your answer for bitwise | (or) operator 1+1=1, 1+0=1 and 0+0=0.
So if we want to make a bit on for always we can use 'or' operator by which when ever we apply 1 or 0, in both cases it with produce one because our required bit is already in one state.
So if we want to make a bit on for always we can use 'or' operator by which when ever we apply 1 or 0, in both cases it with produce one because our required bit is already in one state.
Abhishek yadav said:
1 decade ago
| is bitwise 'or' operator.
Sumit Sharma said:
1 decade ago
1 & 1 = 1 i.e. ON it makes sense here. Both of the bit is ON then Then results comes ON.
Darshana said:
1 decade ago
Please tell which operator is | ?
Kalaiselvan said:
1 decade ago
Explain how it is ?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers