6 Answers
New AnswerWhat's the difference between the Bitwise '&' and the Boolean 'and' expressions. They don't seem to do much else. Also, does the '~' mean.
11/13/2019 6:45:19 PM
Riggonatio6 Answers
New AnswerGo through the link properly Bitwise operators are applicable to integer types only https://www.sololearn.com/learn/4070/?ref=app As for Boolean you are right but go through your python course again https://www.sololearn.com/learn/Python/2279/
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.
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.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message