Hi. I've got to access a set of user permissions. There are 32 possible permissions that can be either true or false. The function that gets the permissions returns a long. Each bit in that long (from 0-31) represents one of the options. What I'd like to do is convert that long to a string of 1's and 0's.

For example, if the number came back as 32 I'd like to convert it to
"00000000 00000000 00000000 00010000"

Thanks.