+ 5
Explain me how does bitwise unsigned right shift operator works. ??
4 odpowiedzi
+ 2
I found a solution: Mathematically, a left-shift is a *=2, 2 left-shifts is a *=4 and so on. A right-shift is a /= 2 and so on.
+ 1
@stanly please...do you mean, left is you multiply by 2 and retain the result.. and right is divide and retain the answer?? can you give a more elaborate.. with eg..
0
Good question. I also don't understand how does it work. Not only right shift, but also a left one.
0
That works for unsigned/positive numbers but I dont get it when there is a negative number because then there is a roll over to positive value.