= Solution
Write an $n$-<bit> <binary string> as $A=a_{n-1}\cdots a_1a_0$, where each $a_i\in\{0,1\}$ and $a_{n-1}$ is most significant. Its <unsigned interpretation> and <two's complement> interpretation are
$$
\boxed{\operatorname{bin}(A)=\sum_{i=0}^{n-1}a_i2^i,\qquad
\operatorname{twoc}(A)=-a_{n-1}2^{n-1}+\sum_{i=0}^{n-2}a_i2^i.}
$$
Equivalently, $\operatorname{twoc}(A)=\operatorname{bin}(A)-a_{n-1}2^n$. The ranges are $0$ through $2^n-1$ and $-2^{n-1}$ through $2^{n-1}-1$, respectively. The same stored <bits> can therefore denote different <integers> depending on the chosen interpretation.
Back to article page