Question:

How to do a subtraction in 2's complement?

by  |  earlier

0 LIKES UnLike

I am doing my computer degree and i am of Arts backgound. I find it little difficult to understand Binary calculations. Can somebody expl. me How to do a subtraction in 2's complement, and if u have time then what is k maps?

 Tags:

   Report

3 ANSWERS


  1. if u have a scientific calculator,it will be easy for u..

    go to binary mode, and u can just simply substract 2's compliment...


  2. 2's Complement Subtraction

    Two's complement subtraction is the binary addition of the minuend to the 2's complement of the subtrahend (adding a negative number is the same as subtracting a positive one).

    For example,

    7 - 12  =  (-5)      

    ...0000 0111  =  +7

    + 1111 0100   =  -12

    ----------------------------

    ...1111 1011  =  -5

    : )

  3. If you want to subtract a number, take the 2's complement and add it instead. To take the 2's complement, invert all the bits and add 1. For example, to do 5 (0101) minus 3 (0011), first compute -3 (1100 + 1 = 1101). Now add 5 + (-3):

      0101

    +1101

    =====

     10010

    Throw away the carry out and you're left with 0010, or 2.

    "K-map" is short for Karnaugh map. They're used in digital logic design to simplify expressions in boolean algebra. This makes for smaller, faster chips. The K-map is how you would design a digital circuit by hand, though in reality special software does the work for you.

    Check out "The Cartoon Guide to the Computer" by Larry Gonick. It sounds silly, but you'll learn a lot of things quickly from it, and it's more interesting than an engineering textbook.

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.