Question:

What is the difference between straight binary arithmatic and signed arithmatic?

by  |  earlier

0 LIKES UnLike

Subtract these binary numerals by hand:

Q1. Ones complement

Q2. Twos complement

Q3. Straight binary arithmetic

Q4. Signed arithmetic and verify by hand addition

0110 1001 1110 1001

-

1011 0101 0001 1101

Thanks For You Help

0110 1001 1110 1001

-1011 0101 0001 1101

I have completed q1 and q2.

I am really struggling witht the last two questions.

Thanks For You Help

 Tags:

   Report

2 ANSWERS


  1. In straight binary arithmetic all number are positive.  In signed arithmetic, you can have positive or negative numbers.

    FOR EXAMPLE:

    in straight binary arithmetic, 4 bits can expressed number from 0 to 15:

    0 0 0 0  = '0'

    0 0 0 1  = '1'

    0 0 1 0  = '2'

    . . . .

    1 1 1 1  = '15'

    In signed binary arithmetic, the Most Significant Bit is used as a sign bit.  If this bit is a '1' then the number expressed is negative.

    But MORE IMPORTANTLY, negative number are usually expressed in TWO'S COMPLEMENT representation.  To do 2's Complement, you take the binary number, invert all bits, then add 1. so:

       0 0 1  = '1'

       1 1 0  [Invert all bits]

       1 1 1  [add '1']

    1 1 1 1  = (-1)  [Most Significant Bit is sign bit]

    1 1 1 0  = (-2)

    1 1 0 1  = (-3)

    1 1 0 0  = (-4)

    1 0 1 1  = (-5)

    1 0 1 0  = (-6)

    1 0 0 1  = (-7)

    lets see how the binary math works:

    (+2) + (-5) = ???

    ...(0 1 0 0)  carry

    ....0 0 1 0  =  (+2)

    .+ 1 0 1 1   =  (-5)

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

    ....1 1 0 1  =  (-3)

    you can of coure, extend this out to however many bit you need, 8, 16, 32 . . . . .


  2. One bit is used for a sign.  But if you're only dealing with positive numbers, it's not needed.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions