Alright; my attempt to explain the problem! Iv got a 16 bit number, each bit represents weather a number, between 1 to 16 was in a collection. 0010 0100 0011 0001 Would signify object 0, object 4, object 5, object 13 and object 10 were in the collection; But sometimes there may be more than 5 objects in the collection: 1101 1010 1011 0100 In this case; I must keep the objects with the highest numbers so it becomes 1101 1000 0000 0000 or 1100 1000 1100 0010 to 1100 1000 1100 0000 - dismissing object 1 Any ideas?