+ 1
Difference between Bitwise, Bitwise exclusive, and Boolean "AND" + "OR" statements.
What's the difference between the Bitwise '&' and the Boolean 'and' expressions. They don't seem to do much else. Also, does the '~' mean.
6 Réponses
+ 3
https://code.sololearn.com/cMpDcIY1S7lY/?ref=app
Bitwise operation works on an integer, it converts it to binary and executes the action bit by bit
See this example for bitwise xor
https://code.sololearn.com/cRXYx1v8t7IQ/?ref=app
Edit:
This code by Burey summarises bitwise operations perfectly.
https://code.sololearn.com/WBOdrCZZT0a7/?ref=app
Thanks ~ swim ~ for the link lower down that lead to this.
+ 2
Thank you both Louis and ~ swim ~ for the help! All questions are answered!
+ 1
I know what the operators mean but I don't know the difference, as I see it right now. To my knowledge the "and" and "or" is for Boolean. Bitwise I would assume goes with floats and integers.