Reputation: 71
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
Upvotes: 0
Views: 436
Reputation: 379
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
.
Upvotes: 3