Re: Q: Fast computation of parity
From: Michael Amling (nospam_at_nospam.com)
Date: 12/31/03
- Next message: TURNOCK6: "Unbreakable code HELP"
- Previous message: Tom St Denis: "Re: Q: Fast computation of parity"
- In reply to: Randy Howard: "Re: Q: Fast computation of parity"
- Next in thread: Randy Howard: "Re: Q: Fast computation of parity"
- Reply: Randy Howard: "Re: Q: Fast computation of parity"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 31 Dec 2003 02:01:50 GMT
Randy Howard wrote:
> In article <eopIb.16364$aw2.9605800@newssrv26.news.prodigy.com>,
> nospam@nospam.com says...
>
>>>y = x ^ (x>>1);
>>>y = y ^ (x>>2);
>>
>> This x>>2 should be y>>2. As it stands, it finds, for example,
>>parity(8) is even.
>
> Yes, sorry, typo in transcription. Thanks for the correction.
Also, for this to work when the (1<<31) bit is on in x, x and y have
to be unsigned. :)
--Mike Amling
- Next message: TURNOCK6: "Unbreakable code HELP"
- Previous message: Tom St Denis: "Re: Q: Fast computation of parity"
- In reply to: Randy Howard: "Re: Q: Fast computation of parity"
- Next in thread: Randy Howard: "Re: Q: Fast computation of parity"
- Reply: Randy Howard: "Re: Q: Fast computation of parity"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|