-
February 5th, 2007, 02:16 PM
#1
Help ..............to find a code................
hello,
Thx in advance...i need to write an assembly code to find a the first zero bit in a bit string....
1. it takes an unsigned long variable
2. i need to extract the long variable in terms of 32 bits.
3. search for the first zero bit..\
4. if the zero is not found in the first set of 32 bits , i need to shift to the next 32 bits and to perform the same search operation.
5. repeat the step 3 till i find a zero bit
pls help me..it is very urgent.,...
bye
sweety
-
February 5th, 2007, 11:21 PM
#2
Re: Help ..............to find a code................
You'll have to do the work yourself.
Here is some logic to help you out:
-x & (x+1)
= rightmost zero bit
= 0 if no zero bits in set
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|