For any u∈[0,1], let us consider a binary expansion
u=0.b1b2…=∞∑n=1bn2−n
where b1,b2,… belong to {0,1} (bits). This expansion is not unique when u is rational, e.g.
0.011111⋯=0.10000⋯.
If U is a uniform random variable on [0,1] then almost surely, U is irrational and its binary expansion is unique with b1,b2,… independent uniform random variables on {0,1}:
P(b1=ε1,…,bn=εn)=2−n
for any n≥1 and every ε1,…,εn in {0,1}. Conversely, if b1,b2,… are independent uniform random variables on {0,1} then the random variable
U:=∞∑n=1bn2−n
follows the uniform law on [0,1]. Actually the odd/even separation map
U=∞∑n=1bn2−n↦(V1,V2):=(∞∑n=1b2n2−n,∞∑n=1b2n−12−n).
allows to extract from U a couple (V1,V2) of independent uniform random variables on [0,1]. More generally, one can extract from U a countable family (Wn)n∈Z of independent uniform random variables on [0,1] by considering the diagonals (or the columns, or the rows) in
b1b2b5b10⋯b4b3b6b11⋯b9b8b7b12⋯b16b15b14b13⋯⋮⋮⋮⋮⋱
This reduces the simulation of any law to the simulation of the Bernoulli law.