1. ## binary number arithmetic/2's compliment

To find out the greatest negative number that can be stored in a 4-bit binary word that uses 2's compliment arithmetic.

The total number of distinct numbers that can be stored in a 4-bit word are 2^4 (including zero) = 16.
But to store negative numbers, these 16 numbers should be such distributed ,so that every positive number has a 2's compliment negative counterpart.But excluding zero there are 15 numbers exclusively.
15 being an odd number cannot be divided in two groups equally.This is where the problem arises.

0000
0001 -> 1111
0010 -> 1110
0011 -> 1101
0100 -> 1100
0101 -> 1011
0110 -> 1010
0111 -> 1001

Here we can see seven positive numbers ,seven negative numbers and zero.The count is 15.
The number omitted is '1000'.
We know that generally, 1000 is considered as -8 and regarded as the greatest negative number that can be stored in a 4-bit word that uses 2's compliment method.

1000, if 2's complimented, gives back 1000.How can we differentiate between +8 and -8 ?

Why is it, that 1000 is always taken as -8 and the greatest positive number that can be stored is 7 and not 8?
And what about the 2's compliment of zero?
This 4-bit problem can be applied to any number of bits.

I hope I could state my problem clearly.Waiting for further discussion...

Koustav Ghosal

2. ## Re: binary number arithmetic/2's compliment

Welcome to the forum.

Originally Posted by koustav123
We know that generally, 1000 is considered as -8 and regarded as the greatest negative number that can be stored in a 4-bit word that uses 2's compliment method.
Strictly speaking, -8 is the least negative number, or the negative number with the greatest absolute value, that can be stored in a 4-bit word.

1000, if 2's complimented, gives back 1000.How can we differentiate between +8 and -8 ?
There is no need to differentiate because 8 is not representable in a 4-bit word.

Why is it, that 1000 is always taken as -8 and the greatest positive number that can be stored is 7 and not 8?
By definition of the representation. There may be several equivalent starting points, but one is to postulate that the word $\displaystyle b_3b_2b_1b_0$ represents the number $\displaystyle -2^3b_3+2^2b_2+2b_1+b_0$.

And what about the 2's compliment of zero?
It is 0 and is found using the standard procedure.

You are probably familiar with the Wkipedia article about two's complement and especially the section about the most negative number. In fact, this article could be given a more rigorous structure from the mathematical viewpoint (but this would probably make it less readable). It would be nice to give a sequence of definitions and theorems that establish connections between equivalent concepts and operations.

3. ## Re: binary number arithmetic/2's compliment

thank you very much.