Von-Neumann debiasing can be used to remove entropy bias from a sequence of random or pseudo-random binary digits using a simple algorithm.
Given the set of binary digits:
and a sequence of arbitrary binary digits:
Let be a debiased random binary number such that:
The following table shows the possible outcomes for the random binary digit :
0 | 0 | discard |
0 | 1 | 0 |
1 | 0 | 1 |
1 | 1 | discard |