Signed Binary Number

signed binary number can be represented in one of the three ways

  1. Signed magnitude representation
  2. 1’s complement representation
  3. 2’s complement representation

Signed magnitude representation : 

  1. If the data has positive as well as negative numbers then the signed binary number should be used.
  2. the + or – signs are represented in the form of binary by using 0 or 1. So 0 is used to represent the ( + ) sign and 1 is used to represent the ( – ) sign.
  3. the MSB of a binary number is used to represent the sign and the remaining bits are used to represent the magnitude.  

8-bit signed binary numbers are shown in fig

magnitude

(a) Positive binary number

negative

(b) Negative binary number 

8-bit signed binary numbers

Advantage of sign magnitude numbers:

  1. the main advantage of sign magnitude number is their simplicity.
  2. we can easily find the magnitude by deleting the sign bit.

Disadvantage of sign magnitude numbers:   sign magnitude numbers have a limited use because the require complected circuits. these numbers are often used in analog to digital converter.

Complements:  Complements are used in the digital computer. it is used to simplify the subtraction operation and for the logical manipulations.

* Note:- we take 1’s and 2’s complement only -ve numbers not +ve numbers.

Decimal

Signed 2’s complement

Signed 1’s complement

Signed magnitude

+ 7

0111

0111

0111

+ 6

0110

0110

0110

+ 5

0101

0101

0101

+ 4

0100

0100

0100

+ 3

0011

0011

0011

+ 2

0010

0010

0010

+ 1

0001

0001

0001

+ 0

0000

0000

0000

– 0

1111

1000

– 1

1111

1110

1001

– 2

1110

1101

1010

– 3

1101

1100

1011

– 4

1100

1011

1100

– 5

1011

1010

1101

– 6

1010

1001

1110

– 7

1001

1000

1111

– 8

1000

Signed Binary Number

Signed Binary Arithmetic:- Addition in 2’s complement method there are four cases

1. Both numbers are +ve

2. +ve number and smaller -ve number

3. +ve number and larger -ve number

4. both number are -ve.

Case 1: Addition of both positive number:

Case 2:  +ve number and smaller -ve number:

  1. find the 2’s complement of the smaller -ve number
  2. Add the +ve number with 2’s complement of smaller -ve number.
  3. The above sum must produse a carry. this carry is always discarded and the remaining bits give the +ve sum.

Let A = + 22 and B = -17

ex2

Case 3:- +ve number adds with larger -ve number

  1. find the 2’s complement to the larger -ve number
  2. Add the +ve number with 2’s complement of larger -ve number
  3. the above addition does not produce any carry. the result is a -ve number in the form of 2’s complement representation.

ex

ex
Case 4:- Both number have -ve number:-

  1. Both -ve number are represented in 2’s complement
  2. their addition produces a carry thawill be discarded
  3. the remaining bits are the result of above addition in the 2’s complement representation.

Example:-  -9 and  -4

ex

ex

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *