226k views
2 votes
1.) what is the minimum number of bits required to represent -3,997 using 2's complement form?

2.) what is the minimum number of bits required to represent -436 using 2's complement form

can someone explain please?! :(

User Embedded
by
4.4k points

1 Answer

2 votes

The binary representation of +3997 is 1111 1001 1101.

In one's complement this is simply adding a sign bit and inverting all the bits:

1 0000 0110 0010

The two's complement is the one's complement plus 1:

1 0000 0110 0011

That's 13 bits. Normally the sign bit would be at an 8, 16 or 32,... bit boundary.

For -436 it's 10 0100 1100 and 10 bits


User Brad Osterloo
by
5.6k points