In any case: Read two bits, if they are identical discard them and read two new, continue to do so until they are different. Return the first bit from the final pair.

This works because the chance of drawing the pairs [1 0] and [0 1] are identical, the absolute chance varies depending on how skewed the random function is, but the variance is completely identical.

]]>