On 9 Nov 2009, at 10:49, Thomas Wetmore wrote:
The approach found by Ron prints the bits in correct order. The suggested replacement prints them backwards. Other correct solutions can be done without recursion, but require a char buffer that must either be reversed or printed in reverse 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).
Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com