0

the largest negative and positive integers for n-bit 1’s and 2’s complement systems? What are these numbers for 32-bit registers?

If (1000001110)2 is an integer in a 10-bit 2’s complement system, what is the binary code for it in 20-bit 2’s complement system?

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by strmstn
0

Since this is obviously homework, first tell us what you think the answer should be (and why).

Im at a total lost for the first problem but for the second problem I think it would be 0000000000100001110 because it would be 20 bits without changing the value of the interger and it remains in 2's complement

0

Im at a total lost for the first problem but for the second problem I think it would be 0000000000100001110 because it would be 20 bits without changing the value of the interger and it remains in 2's complement

IIRC, you'd lose the sign value though. The 10 bit version was negative and you 20 bit version is positive (assuming the sign bit is always your most significant bit). Of course I might be wrong, but that was my first thought.

0

When filling out a number in order for it not to lose its sign you'll have to use the most significant bit.
For example:
0100 -> 00000100,
1010 -> 11111010.
Notice though, that this only concerns signed numbers.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.