delete duplicates by bit operation