Compute a Distribution Function for Rationals in the Unit Interval 

Order the rational numbers between zero and one by their binary representation.

show complete Wolfram Language input
In[2]:=
Click for copyable input
X
Out[2]=

The cumulative distribution function of rationals in this ordering is the MinkowskiQuestionMark function.

In[3]:=
Click for copyable input
X
show complete Wolfram Language input
Out[4]=
de es ja pt-br zh