ThmDex – An index of mathematical definitions, results, and conjectures.
In the case of $N = 4$, 1111 is a base-2 representation of -1 because we have \begin{equation} \begin{split} -2^3 + 2^2 + 2^1 + 2^0 = -8 + 4 + 2 + 1 = -1 \end{split} \end{equation} Flipping the highest-order bit, 0111 is a base-2 representation of 7 because we have \begin{equation} \begin{split} 2^2 + 2^1 + 2^0 = 4 + 2 + 1 = 7 \end{split} \end{equation}