example of binary subtraction - positive


Example  of binary  subtraction - positive number

Case 1.  Positive  number is more than negative number ( i e, answer is positive)

 Example   subtract  4510 ( 1011012 ) form 9210 ( 10111002.

 Solution: write  both numbers  is in 8 bit  form

01011100                                                                   9210

-00101101                                                                  -4510

1 s complement  of the negative number  =              11010010

Add 1                                                                                 1

2 s complement of the negative number =                11010011

This will represent -4510 in microprocessor                

Adding 2 s complement  of the  negative  number with the  first (positive ) number

      01011100 (9210)

      +11010011( -4510)

 Carry   00101111( +4710)

 Ignoring carry the  answer is  + 0010 11112 ( +4710)

 

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: example of binary subtraction - positive
Reference No:- TGS0222073

Expected delivery within 24 Hours