+ 1
Can anyone explain how this works...??
2 Answers
+ 4
https://www.sololearn.com/learn/4086/?ref=app
+ 3
it's a right shift operator inside your print statement
you are shifting each bit of number 8 by 1 in the right direction
for example
8 = 0000-1000 in binary
// - dash will not be here
after shifting each bit in the right direction by one place
we wiill get
0000-0100 // omit the dash (-)
in binary 4 = 00000100
that's why the final answer is 4