The following code creates a bit set from a long value and vice versa

From http://stackoverflow.com/questions/2473597/bitset-to-and-from-integer-long