Re: beginner question, NSNumber, NSDecimalAsNumber
Re: beginner question, NSNumber, NSDecimalAsNumber
- Subject: Re: beginner question, NSNumber, NSDecimalAsNumber
- From: Jeffrey Oleander <email@hidden>
- Date: Mon, 9 Nov 2009 10:49:30 -0800 (PST)
> On Mon, 2009/11/09, Alastair Houghton <email@hidden> wrote:
> From: Alastair Houghton <email@hidden>
> Subject: Re: beginner question, NSNumber, NSDecimalAsNumber
> To: "Thomas Wetmore" <email@hidden>
> Cc: "list-cocoa-dev List" <email@hidden>
> Date: Monday, 2009 November 9, 5:55
>> On 2009 Nov 09, at 10:49, Thomas Wetmore wrote:
>> The approach found by Ron prints the bits in
>> correct order...
>
> Or you can calculate the number of bits and
> fill the buffer in reverse. It's pretty
> easy to do a bit count on a fixed-size word
> (no need for a loop, in fact).
Last I looked, 1-bit count was an assembly/
hardware instruction. Getting the highest
order on-bit required a little cleverness.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden