On Wed, Feb 18, 2009 at 12:41 AM, Jiang <webs...@yahoo.cn> wrote: > Hello guys, > I want to obtain least 32 bits from a number of type long, so I perform > bitwise operation "&" on the number with bits mask 0xFFFFFFFF, but the > result is error, it still contains other bits. > > for example: > long a = 0x1234567890abL; > long b = (a & 0xFFFFFFFF); > I expect the value of b is 0x567890abL, but in practice, it is still > 0x1234567890abL. >
Output : ubuntu:~$ ./t32bit b =567890ab I am getting correct output. > > > Is this a bug ? > > Thanks. > -John. > > ------------------------------ > 好玩贺卡等你发,邮箱贺卡全新上线! > > <http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/> -- Thanks Rizavan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---