Negative One vs Seven: A 2's Complement Comparison

Click For Summary
SUMMARY

The discussion focuses on the representation of negative one and seven in the 2's complement system, specifically using a 3-bit binary format. In 2's complement, the bit pattern "111" represents both -1 and 7, highlighting the importance of context in interpreting binary values. The advantages of 2's complement over signed magnitude and 1's complement are emphasized, particularly its elimination of the +0/-0 ambiguity and its ability to facilitate straightforward binary arithmetic. The conversation concludes that understanding the context is crucial for accurate interpretation of bit patterns.

PREREQUISITES
  • Understanding of binary number systems
  • Familiarity with 2's complement representation
  • Knowledge of signed magnitude and 1's complement systems
  • Basic arithmetic operations in binary
NEXT STEPS
  • Research the differences between 2's complement and signed magnitude systems
  • Learn about binary arithmetic operations using 2's complement
  • Explore the implications of +0 and -0 in signed magnitude and 1's complement
  • Investigate the concept of excess-N representation in binary systems
USEFUL FOR

Computer scientists, software engineers, and anyone interested in understanding binary arithmetic and number representation in computing systems.

amaresh92
Messages
163
Reaction score
0
in 2's complement the negative of 1 is "111". but it also signifies 7 in decimal. how does this -ve 1 is differ from 7?
thanks
 
Engineering news on Phys.org
Do you not mean 1001 and 0111? (the most sig digit needs to be included or you can't represent numbers that way).
These two numbers represent one above and one below 1000, which is half way up the range from zero to fifteen. It is convenient to use 1000 (8) as a zero point then you can go above or below it - just like using half of your graph paper for positive numbers and half for the negative numbers. So we call 9, +1 and 7, -1 etc.

This system is better than using a number and a sign digit because that system produces plus and minus zero! and your number scale has a hiccup in it. Not very good for doing sums with. The two's complement system allows you to add and subtract binary numbers, positive and negative, whereas number and sign can produce the wrong answer.
You may have noticed that this system is lopsided - there's one more number (0000) at the bottom than at the top but it's a small price to pay if you want to do calculations.
 
amaresh92 said:
in 2's complement the negative of 1 is "111". but it also signifies 7 in decimal. how does this -ve 1 is differ from 7?
thanks
Assuming 3 bits, the only difference is in the interpretation.

<br /> \begin{array}{c|ccccc}<br /> \mbox{Bit Pattern} &amp; \mbox{Unsigned} &amp; \mbox{Signed Magnitude} &amp;<br /> \mbox{1s Complement} &amp; \mbox{2s Complement} &amp; \mbox{Excess-3} \\<br /> 000 &amp; 0 &amp; +0 &amp; +0 &amp; \phantom{+}0 &amp; -3 \\<br /> 001 &amp; 1 &amp; +1 &amp; +1 &amp; +1 &amp; -2 \\<br /> 010 &amp; 2 &amp; +2 &amp; +2 &amp; +2 &amp; -1 \\<br /> 011 &amp; 3 &amp; +3 &amp; +3 &amp; +3 &amp; \phantom{+}0 \\<br /> 100 &amp; 4 &amp; -0 &amp; -3 &amp; -4 &amp; +1 \\<br /> 101 &amp; 5 &amp; -1 &amp; -2 &amp; -3 &amp; +2 \\<br /> 110 &amp; 6 &amp; -2 &amp; -1 &amp; -2 &amp; +3 \\<br /> 111 &amp; 7 &amp; -3 &amp; -0 &amp; -1 &amp; +4<br /> \end{array}

Bottom line: There is no telling just from looking at the bit pattern what a bit pattern represents. You need to know the context.

Note also that signed magnitude and 1s complement suffer from having +0 and -0. That can create some nasty problems. Note that 2s complement does not have a +0/-0 problem but does have an asymmetry; there is one more negative number, -4 in this case, than there are positive numbers in 2s complement. The opposite occurs with excess-N.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
6
Views
4K
  • · Replies 3 ·
Replies
3
Views
20K
  • · Replies 4 ·
Replies
4
Views
3K