Re: Dr. Dobbs Dev. Update 1/5 July 94 & Schneier
17 Dec
2003
17 Dec
'03
11:17 p.m.
At 01:00 1994/07/03 -0400, tim werner wrote:
This instruction would be useful in all sorts of applications. I was just wishing I had such a thing only last week. I had to write a little loop to check the number of bits set in a word. Each bit represented an action, and in my particular case it was an error if more than 1 action was requested. The loop was really a waste when you consider that it could have been done in 1 instruction.
tw In C, {int j... if(j & (j-1)) not_exactly_one_bit; ...}
8081
Age (days ago)
8081
Last active (days ago)
0 comments
1 participants
participants (1)
-
norm@netcom.com