> >  a shift right ">>" works the way you intend if the number is
> >  unsigned.. however, if you have a negative number, the shifting
> >  works slightly different.
> >
> >  -32 >> 1 should give you -16 right? and what does this tell
> >  you just by looking at it? *the* SIGN bit is maintained, and
> >  hence the MSB is not removed :>
> 
> I don't think you can rely on the behavior of >> on signed integers in C.

  you can rely on them, however it all depends on the implementation of
  shr on the CPU you are intending to use. :P

az. 
--
Aaron Ardiri 
Java Certified Programmer      http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 8 668 78 72

if you enjoy it, then it aint work :) - rule #106 of life


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to