logic cleanup on flipping bit pairs