Hi,
can anyone explain the unsigned right shift operator with example?
And also why there is no unsigned left shift operator? is there any specific reason for that?
-Thanks & regards,
Hamsa
Why don't you just write a little test program and see for yourself? Both the
signed and unsigned right shift operator shift their left operand to the right. The
signed shift moves a copy of the leftmost bit (the 'sign bit') in as the new leftmost
bit; the unsigned right shift puts a zero bit there.
Doing the same for a left shift would be (almost) without meaning as a 'signed
left shift' because the rightmost bit isn't a sign bit.
kind regards,
Jos