Simplify binary expansion

179 Views Asked by At

Let $Bin[n]$ denote the binary expansion of integer $n$.

Does there exist a simplification of the formula $Bin[\sum a_i 2^i]$ ?

Clearly when $a_i \in \{0,1\}$, then the $a_i$ already represent binary digits, but what about $a_i \in \mathbb{Z}$ ?

1

There are 1 best solutions below

0
On BEST ANSWER

Not really. The $k^{th}$ bit is the exclusive or of bits of some $a_i$'s shifted to the proper position and the carry from the previous bit. Any formula that you will write won't be very different from the addition algorithm.