Computer Science Question
James McDonald
james at jamesmcdonald.id.au
Mon Nov 17 21:28:52 PST 2014
Hi All,
I am wondering how to do the following:
Say I have a list of values I want to assign to a person e.g.
1. Male
2. Female
3. Happy
4. Sad
5. Child
6. Red is favorite color
7. Blue is favorite color
8. RIght handed
9. Left handed
etc.
Now how do I make the list contain numerical values that I can then add
together and then end up with a number that I can reverse and discern
which values were assigned to the person?
I believe that there is something in binary that means you can assign
bit or a corresponding number to each option and then pull out the
selections programmatically
My problem is I can't figure out what to Google to teach myself how to
do it.
Can anyone point me in the right direction?
Thanks.
James McD.
More information about the Linux-users
mailing list