If you wanted to get really clever...
Do as Bernie says. You'll have to pack the 31 bits into a double word (32 bits), let's use DD1.
You'll end up with the following.
C1 active = 0000 0000 0000 0000 0000 0000 0000 0001 = 1 = 2^0
C2 active = 0000 0000 0000 0000 0000 0000 0000 0010 = 2 = 2^1
C3 active = 0000 0000 0000 0000 0000 0000 0000 0100 = 4 = 2^2
C4 active = 0000 0000 0000 0000 0000 0000 0000 1000 = 8 = 2^3
C5 active = 0000 0000 0000 0000 0000 0000 0001 0000 = 16 = 2^4
...
C31 active = 0100 0000 0000 0000 0000 0000 0000 0000 = 1,073,741,824 = 2^30
Now, run the following calculation and store it in DD2:
Log(DD1)/Log(2)
That equation is the inverse of 2^x, so ultimately, what you'll get back is:
C1 active (which worked out as 2^0): 0
C2 active (which worked out as 2^1): 1
C3 active (which worked out as 2^2): 2
C4 active (which worked out as 2^3): 3
...
C31 active (which worked out as 2^30): 30
Then add 1 to your result, and hey presto, the number you end up with is the same as the number of the C register! (side note: you only have to add 1 because Click addressing starts at 1, not 0)
Of course, this will only work if you can do advanced math instructions on double words in a click. It may well not be possible - if there's ever any fancy math involved I write the Click off as an option fairly quickly, so I've never really tried to do a huge amount.