bit array to sort number