Another larger-than-31-bit function.Works for very large numbers, but at the expense of perfect bit-precision as the size increases (I noticed rounding errors past 16 or so decimal places) so use with caution, and only when decbin() won't cut it.

additional note: if you "bitwise and" some random bits with a sequence of 1-bit of the same length, the expected result is the same "random bits sequence" unchanged. If you want to keep this in the integer world for faster comparisons, you risk messing your result for the signed integer size limitation. The maximum value you can use for the desired result is (7FFFFFFF -- or integer 2147483647), half of the maximum 'unsigned' integer 32-bit(platform-dependent) value.

function bindecValues($decimal, $reverse=false, $inverse=false) {/*1. This function takes a decimal, converts it to binary and returns the decimal values of each individual binary value (a 1) in the binary string. You can use larger decimal values if you pass them to the function as a string!2. The second optional parameter reverses the output.3. The third optional parameter inverses the binary string, eg 101 becomes 010.-- darkshad3 at yahoo dot com*/