+ 1
Are there anybody who can tell me binary operations easily?
Basic operations?
3 ответов
+ 10
Bitwise operator keywords
& bitwise AND
| bitwise inclusive OR
^ bitwise exclusive OR
~ bitwise complement
Bitwise assignment operator keywords
&= bitwise AND assignment
|= bitwise inclusive OR assignment
^= bitwise exclusive OR assignment
Example
int main() {
int x = 12; // 1100
int y = 13; // 1101
int z = x ^ y; // x XOR y --> z = 1
cout << z;
}
x y & | ^
----------------------
0 0 0 0 0
0 1 0 1 1
1 0 0 1 1
1 1 1 1 0
+ 1
like what? 0+0 is 0 , 1+1 is 0, 0+1 & 1+0 is 1...well those r the basic operations
0
Yes, I am talking about basic operations.