How one can calculate $s_2(p)$

18 Views Asked by At

Let us define the integer $p$ as follow:

$$p= \sum_{i=1}^{m}(2^{k+2})^{i}-r2^{k+2}-2w+1+3a$$

How one can calculate $s_2(p)$ the sum of binary digits of $p$. Here all the arguments are integers.