Apologise for a vague title.
What is the best way to pass a finite number of properties(e.g. read, write, execute, ...). I think I could do this like these permissions - count the sum of some numbers assigned to properties - 1,2,4,8,16... Is it the best easy to do this and what algorithm should I use to get the summands - for example if I have 17 - how could I calculate that this is 16 and 1?
Thanks.