I am not mathematically proficient so please keep that in mind and am tackling a programming problem I'd like to solve optimally.
I have a register $32$ bits wide at any one time only $16$ bits(flags) can be set
I would like to calculate the number of possible permutations, but not sure where to start.
Ultimately I would like to store the $32$ bit register in as few bits as possible. There is less than $2^{32}$ permutations but more than $2^{16}$. It seems to be a factorial problem but I cannot work out how.
I tried to nut it out using much smaller register widths where half the registers can be set at any one time but other than manually writing out each one I still couldn't work it out.
If anyone could help I'd appreciate it.
Chris