Skip to content

Commit 5d7ade9

Browse files
Add files via upload
1 parent 0d19155 commit 5d7ade9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: 17thProgram_Operators_BitwiseOROperator.cpp

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include<iostream>
2+
using namespace std;
3+
int main(){
4+
int a = 10;
5+
int b = 12;
6+
int c = a | b;
7+
cout<<"(BIT WISE OR)C = "<<c<<"\n";
8+
return 0;
9+
}
10+
/****************************************************************
11+
* a = 10 => 1010;
12+
* b = 12 => 1100;
13+
* c = a | b => 1110;
14+
* --------------------------------------------------------------
15+
* Truth Table of OR Operator
16+
*
17+
* a | b | result
18+
* 0 | 0 | 0
19+
* 0 | 1 | 1
20+
* 1 | 0 | 1
21+
* 1 | 1 | 1
22+
* --------------------------------------------------------------
23+
*
24+
*
25+
*
26+
*
27+
*
28+
******** /

0 commit comments

Comments
 (0)