Binary Subtraction


    #include<iostream.h>
    #include<conio.h>
    void main ()
    {
        int a = 17 , b = 26 ;
        int result ;

        a = ~ a ;
        a = a + 1 ;
        result = b + a ;
        cout <<b<<" -" <<a<<"=" <<result;
        getch();
    }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|