+ 1
symbol
Anyone knows what this symbolâ>>â meansïŒ print(2>>2) #Output:0 print(3>>2) #Output:0 print(4>>2) #Output:1 print(8>>2) #Output:2 print(10>>2) #Output:2 print(12>>2) #Output:3 I really curious about how this symbol made the outputđ„Ž
3 Answers
+ 2
This is what I found by searching"right shift operator":
Takes two numbers, right shifts the bits of the first operand, the second operand decides the number of places to shift. In other words right shifting an integer âxâ with an integer âyâ denoted as â(x>>y)â is equivalent to dividing x with 2^y.Â
eg: lets take N=32; which is 100000 in Binary Form.
   Now, if âN is right-shifted by 2â i.e N=N>>2 then N will become N=N/(2^2). Thus, N=32/(2^2)=8 which can be written as 1000.
+ 3
Look for bitwise right shift in this
https://www.sololearn.com/learn/4070/?ref=app
+ 1
Thanks Ipang, it really helps me!