minimum bits for a 2s complement of a number

394 Views Asked by At

I came across the question to find out 2's complement of -32 . how to determine in minimum no of bits how -32 is represented in 2's complements. Is it 1100000 or 100000

1

There are 1 best solutions below

0
On

Easy way to compute 2's complement is adding 1 to its 1's complement. Using 7 bits (min for 32) 32 is 0100000, so -32 is 1011111 using 1's complement. With 2's complement, you add 1 so it becomes 1100000.