+ 19
Please anyone explain me I need clear explanation
12th Jun 2020, 1:38 PM
Thayani Gathirvelou🇱🇰
30 Answers
+ 21
Thayani Gathirvelou🇱🇰 here are best explained lesson for bitwise operations have an look over these.https://www.sololearn.com/learn/4070/?ref=apphttps://www.sololearn.com/learn/4072/?ref=apphttps://www.sololearn.com/learn/4073/?ref=apphttps://www.sololearn.com/learn/4074/?ref=apphttps://www.sololearn.com/learn/4076/?ref=apphttps://www.sololearn.com/learn/4087/?ref=apphttps://www.sololearn.com/learn/4405/?ref=apphttps://www.sololearn.com/learn/4086/?ref=app
12th Jun 2020, 1:56 PM
Preity
+ 9
Preity thank you
12th Jun 2020, 1:56 PM
Thayani Gathirvelou🇱🇰
+ 9
//= is floor division&= is bitwise AND|= is bitwise OR^= is bitwise XOR>>= is bitwise right shift. <<= is bitwise left shift. The equal at the end is because you give a variable at the front and a value after it and the final value will be stored in the variable.
12th Jun 2020, 1:58 PM
👑 Prometheus 🇸🇬
+ 7
Thank you 🙏🙏
12th Jun 2020, 1:50 PM
Thayani Gathirvelou🇱🇰
+ 7
Ok thank you🙏🙏
12th Jun 2020, 2:02 PM
Thayani Gathirvelou🇱🇰
+ 6
>> right shift and << left shifta = 0011 1100a >>= 2# a is now 0000 1111
12th Jun 2020, 1:48 PM
Slick
+ 6
Thayani Gathirvelou🇱🇰 check Preity's answer which has links to the various bitwise operators.
12th Jun 2020, 2:01 PM
👑 Prometheus 🇸🇬
+ 6
But anyways, x<<=2 is basically just 5*2^2=20.
12th Jun 2020, 2:02 PM
👑 Prometheus 🇸🇬
+ 6
Dulshan Weeratunge % Modulus: Divides and returns the value of remainderExamples:-1)>>>4%3; output 12)>>>10%3; Output 13)>>>10.5%3 Output 1.5
13th Jun 2020, 6:16 AM
narayanaprasad
+ 6
Dulshan Weeratunge= divides and returns🔝
13th Jun 2020, 6:17 AM
narayanaprasad
+ 5
I understand addition operator but couldn't understand bitwise operators
12th Jun 2020, 1:43 PM
Thayani Gathirvelou🇱🇰
+ 5
This article will definitely help you https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/python_operators.asp
13th Jun 2020, 12:49 AM
ReDaDDi
+ 4
Instead of a = a + 5Its a += 5Exactly the same thing (goes for the other operators as well) Its just to make it easier since variables are updated so often.
12th Jun 2020, 1:40 PM
Slick
+ 4
Prom x=5 x<<=2 how to calculate this
12th Jun 2020, 2:00 PM
Thayani Gathirvelou🇱🇰
+ 4
Thank you friends Now i clearly understand Thank you so much 🙏🙏🙏
12th Jun 2020, 2:10 PM
Thayani Gathirvelou🇱🇰
+ 4
Ya now iam clear about it
12th Jun 2020, 2:20 PM
Thayani Gathirvelou🇱🇰
+ 4
You may find answer elucidated in Python in https://www.programiz.com/python-programming/operators
13th Jun 2020, 3:04 AM
narayanaprasad
+ 3
Pls explain what is % in Python
13th Jun 2020, 4:30 AM
Dulshan Thakshila Weeratunge
+ 3
Thank you all now i clearly understand 🙏🙏🙏🙏
13th Jun 2020, 6:20 AM
Thayani Gathirvelou🇱🇰
+ 3
👍
9th Jun 2021, 8:40 AM
Tharul Nejana
Often have questions like this?
Learn more efficiently, for free: