Friday, February 28, 2020

Signed Numbers Representation





                In general, we represent the positive numbers without any sign indication and negative numbers with ‘minus’(negative) sign before them. But these are not applicable for computing in the digital systems like, computers, as the data is represented in binary number system. So to represent the sign a special notation is required.


    Positive signed binary numbers

                The binary numbers having their MSB (Most Significant Bit) 0 are called “Positive signed binary numbers”.


     Negative signed binary numbers

                The binary numbers having their MSB (Most Significant Bit) 1 are called “Negative signed binary numbers”.

We can represent their range only from – (2(n-1) - 1) to +(2(n-1) – 1)


     Signed & Magnitude Representation

                The binary numbers which can be identified by their MSB whether they are positive or negative are called “Signed binary numbers”.
                Eg           1001               +9 (positive) 
                                 1001               -1 (negative)
·         Positive number is represented with “0” at its MSB.
·         Negative number is represented with “1” at its MSB.




                            One’s complement is another way to feeding the negative binary number to the computer. In one’s complement method, the positive binary numbers are unchanged. But the negative numbers are represented by talking one’s complement of unsinged positive numbers.
                            A positive number always starts with 0, at its MSB while a negative number always starts with 1, at its MSB.
                Eg           35 is represented as 1000112
                                In 8-bit notation, it is represented 0010 00112
                                Now 35 is represented in one’s compliment as 1101 11002



                Eg           10 is represented as 10102
                                In 8-bit notation, it is represented 0000 10102
                                Now 10 is represented in one’s compliment as 1111 01012



                The process of finding is similar to the process of calculating 10’s complement of decimal numbers. To find the two’s compliment of a binary number, first we should find the one’s compliment of that number and later “1” is added to the one’s compliment. Two’s compliment representation of positive numbers is same is same as the representation of one’s compliment and singed magnitude representation.
                Eg           42 is represented as 1010102
                                In 8-bit notation, it is represented as 0010 10102
                                Now 42 is represented in one’s compliment as 1101 01012
                                Adding 1 to it
                                The result is 1101 01102

                Eg           99 is represented as 11000112
                                In 8-bit notation, it is represented as 0110 00112
                                Now 99 is represented in one’s compliment as 1001 11002
                                Adding 1 to it
                                The result is 1001 1101






No comments:

Post a Comment

Signed Numbers Representation

  Signed Numbers Representation                 In general, we represent the positive numbers without any sign indication and neg...