How can 1's complement, and 2's complement have different ranges?

Click For Summary
SUMMARY

The discussion clarifies the differences in range between 1's complement and 2's complement representations in an 8-bit register. Specifically, 1's complement ranges from -127 to 127, while 2's complement ranges from -128 to 127. The presence of both +0 and -0 in 1's complement is highlighted as a unique characteristic, which does not occur in 2's complement. Additionally, the binary value 1111 1111 represents -0 in 1's complement and -128 in 2's complement, while 1000 0000 represents -127 in 1's complement and 128 in 2's complement.

PREREQUISITES
  • Understanding of binary number systems
  • Familiarity with signed number representations
  • Knowledge of 8-bit register architecture
  • Basic concepts of computer arithmetic
NEXT STEPS
  • Research the implications of signed number representations in programming languages
  • Learn about the advantages of 2's complement over 1's complement
  • Explore how different architectures handle binary arithmetic
  • Study the conversion methods between binary and decimal for signed numbers
USEFUL FOR

Computer science students, software engineers, and anyone interested in understanding binary arithmetic and signed number representations in computing.

Callmelucky
Messages
144
Reaction score
30
Homework Statement
How can 1's complement, and 2's complement have different ranges?
Relevant Equations
For 1's complement: -(2^(n-1)-1) till 2^(n-1)-1. For 2's complement - 2^(n-1) till 2^(n-1)-1
How can 1's complement, and 2's complement have different ranges?
For 1's complement range is for 8 bit register(where first is for sign +, -) from - 127 to 127 and for 2's complement range is from - 128 to 127.

I came accros the fact that for 1's complement we have +0 and - 0, why is that and why we don't have that for 2's complement?

Thank you.
 
Physics news on Phys.org
What does the binary value 1111 1111 represent in 1's complement? And in 2's complement? What about 1000 0000?
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
5
Views
2K