# 2's complement problem

1. Feb 13, 2016

### TheMathNoob

1. The problem statement, all variables and given/known data
write the 6-bit 2's complement representation of -32

2. Relevant equations

3. The attempt at a solution
the only way to represent the magnitude 32 in binary is by using 6 bits, so it would be 100000. This is a little bit confusing to me hence in 2's complement we always use the most significant bit to indicate negativeness or positiveness. If 100000 is in 2's complement then it should be a negative number and it is if we just apply the math on it. I think that one more bit will be needed but the book says otherwise. 32 in 2's complement in 6 bits is 100000 and -32 in 2's complement 6 bits is 100000.

2. Feb 13, 2016

### Staff: Mentor

You didn't write the Relevant Equations. How does 2s complement work? What is zero? What is +1? What is -1?

3. Feb 13, 2016

### Staff: Mentor

You cannot have both ±32 since this would be 65 numbers and 6 bits are only 64 numbers.

4. Feb 14, 2016

### Buzz Bloom

Hi TheMathNoob:

Unless the notation of for 6 bit representations of numbers has changed since I learned about them many decades ago, this is a trick question. What is the representation of 64 in 6 bit notation?

Hope this helps.

Regards,
Buzz

5. Feb 14, 2016

### haruspex

To my knowledge, it has not changed in 50 years, and it is not a trick question. -32 can be written in 6 bit 2's complement, but +32 cannot.
One way to think of it is that the nth bit from the right, starting at n=0, represents 2n, with the leftmost being negative and the rest positive.

6. Feb 14, 2016

### Buzz Bloom

Hi haruspex:

Of course you are right. Sloppy thinking on my part, another senior moment. Thanks for your correction.

Regards,
Buzz

7. Feb 18, 2016

### vela

Staff Emeritus
I wonder if you're misreading what the book says. Does it really say the six-bit, two's complement representation of +32 is 1000002? Or does it say the binary representation of 32 is 1000002, and then proceed to find the two's complement of that?

If the book says that the two's complement representation of +32 is 1000002, that's incorrect, as others have pointed out.