As far as determining your binary number programmatically, and i'm fishing way back into my math memory here.....but...
If you did Floor(Log Base 2 of X), that should tell you the last "on" bit. Then raise 2 to the power of Floor(Log Base 2 X). Take this value, subtract it from your original value, and you have the seed for the next run. Repeat this process until you've determined all your "on" bits. (Log Base 2 of X = 0). If your bits are numbered from 0, this should work. ----- Original Message ----- From: "Richard Meredith-Hardy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, October 21, 2004 10:51 AM Subject: Re: what is it called..? > No relation, I'm afraid! > > Say I have a DB record with lots of attributes. Rather than have loads > of bit columns which each have to be individually evaluated yes/no, I > think you can achieve the same thing by having the single value 22 which > can be evaluated later to mean 2=yes, 4=yes, 8=no, 16=yes, 32=no Etc. > > > <snip> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.houseoffusion.com/banners/view.cfm?bannerid=11 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182207 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

