Are there anybody who can tell me binary operations easily? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Are there anybody who can tell me binary operations easily?

Basic operations?

29th Sep 2017, 8:24 AM
Yusuf
Yusuf - avatar
3 Antworten
+ 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
29th Sep 2017, 8:46 AM
Babak
Babak - avatar
+ 1
like what? 0+0 is 0 , 1+1 is 0, 0+1 & 1+0 is 1...well those r the basic operations
29th Sep 2017, 8:30 AM
Suhail Pappu
Suhail Pappu - avatar
0
Yes, I am talking about basic operations.
29th Sep 2017, 9:02 AM
Yusuf
Yusuf - avatar