[thelist] Unique combination numbering

Michael Pemberton evolt at mpember.net.au
Fri May 7 09:50:57 CDT 2004


João Verde wrote:

> The situation:
> =========
> 
> I have a form with a field for which there are 5 possible checkboxes.
> 
> [EXAMPLE]
> Water: [ ] River [ ] Lagoon [ ] Pool [ ] Sea [ ] Other
> [/EXAMPLE]
...
> The question:
> =========
> 
> Is there a (simple) mathematical approach to this?
> 
> Thanks in advance. I'm puzzled. %-)
> 

Binary?

0 0 0 0 0 = 0
0 0 0 0 1 = 1
....
0 1 1 1 1 = 15
1 1 1 1 1 = 31

The wonders of computing in their simplest form :)

-- 
Michael Pemberton
evolt at mpember.net.au



More information about the thelist mailing list