0
$\begingroup$

I am currently reading a textbook and I can't seem to understand what the examples in the book did. I do believe it is an error with the book, but if not can someone explain?

enter image description here

How come there is no negative sign in front of the final result?

$\endgroup$
2
  • 1
    $\begingroup$ Look again. There IS a negative sign in front of the result! $\endgroup$ – barak manos Feb 5 '15 at 7:27
  • $\begingroup$ Actually there shouldn't be any negative sign: the first two rows show addition of $1$ and $1$, and under the line they say $-10_2$ and $-2_{10}$. Why no sign — because inversion and increment is equivalent to negating a twos-complement binary number, and negating $-2$ must give you $+2$. $\endgroup$ – Ruslan Feb 5 '15 at 14:44
1
$\begingroup$

$-2_{ten}=\begin {cases}-000000...000010_{two} \ \ \text{in signed binary}\\ \ \ \ 11111111...1110_{two} \ \ \text {in 2's complement binary}\\ \end{cases}$

In $2$'s complement binary the sign is expressed by the leading $1$'s.

Taking the absolute value of a negative number (leading $1$'s) in $2$'s complement binary is flipping the bits and then adding one.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.