According to here, arithmetic-shift
will bit-shift left and right. The right shift preserves the sign. Is there any unsigned right-shift operator, which fills the vacated bits with zero instead of the sign bit?
views:
90answers:
1
+1
A:
Shift it right by 1 bit, then zero out the sign bit. Then shift it by however many extra bits you need.
Artelius
2009-11-07 02:02:57