Re: [CHALLENGE] finding rightmost zero bit
- From: "N. Shamsundar" <shamsundar_at_@xxxxxx>
- Date: Tue, 30 Aug 2005 08:22:52 -0500
Bart Vandewoestyne wrote:
On 2005-08-29, glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx> wrote:
I would say that with the traditional 1 origin arrays that it makes some sense to use 1 for the LSB. In mine I return 0 for the case of no zero bits.
There is *always* a first rightmost zero bit! So 0 is an answer that is not possible here...
Oh? What about the machine word with all bits set to 1? For example, an 8 bit word with value 255? Or is one supposed to look outside the machine word to find the 0 bit which is "always there"?
N. Shamsundar University of Houston
Suppose for example 3, being 11 in binary, or also being 011 in binary... so the index to be returned here is 3.
Regards, Bart
.
- Follow-Ups:
- Re: [CHALLENGE] finding rightmost zero bit
- From: Bart Vandewoestyne
- Re: [CHALLENGE] finding rightmost zero bit
- References:
- [CHALLENGE] finding rightmost zero bit
- From: Bart Vandewoestyne
- Re: [CHALLENGE] finding rightmost zero bit
- From: James Van Buskirk
- Re: [CHALLENGE] finding rightmost zero bit
- From: glen herrmannsfeldt
- Re: [CHALLENGE] finding rightmost zero bit
- From: Bart Vandewoestyne
- [CHALLENGE] finding rightmost zero bit
- Prev by Date: Re: [CHALLENGE] finding rightmost zero bit
- Next by Date: Re: [CHALLENGE] finding rightmost zero bit - C programmer's take
- Previous by thread: Re: [CHALLENGE] finding rightmost zero bit
- Next by thread: Re: [CHALLENGE] finding rightmost zero bit
- Index(es):
Relevant Pages
|