Binary digit (source code)

= Binary digit
{title2=$b_j\in\{0,1\},\quad n=\sum_jb_j2^j$}

A <binary digit> is a zero or one in the base-two positional representation of an <integer>. The sum $s_2(n)=\sum_jb_j$ determines the <Thue–Morse sequence> and is the <Hamming weight> of the binary representation.