G oog le BadWeB | Login/out | Topics | Search | Custodians | Register | Edit Profile


Buell Forum » Quick Board » Archives » Archive through September 05, 2012 » Subtraction using 2's complement « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Cataract2
Posted on Thursday, August 30, 2012 - 03:26 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

More homework help here. I need to subtract numbers in binary using the 2's complement to represent negative numbers. It also states to use a work of 6 bits and to indicate if an overflow occurs. I'm a bit lost on this one and need some help. (-8)+(-11)
Top of pagePrevious messageNext messageBottom of page Link to this message

Mr_grumpy
Posted on Thursday, August 30, 2012 - 04:10 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

I'll just stick my finger in my ear & say red, backwards.
Top of pagePrevious messageNext messageBottom of page Link to this message

Britchri10
Posted on Thursday, August 30, 2012 - 04:14 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

Buy a calculator?
I just finished college level introduction to algebra.
8 weeks of WTF & why do I need to know this?
(Still, it has been 35 years since I took a math class!)
Chris C
Top of pagePrevious messageNext messageBottom of page Link to this message

Reindog
Posted on Thursday, August 30, 2012 - 04:30 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

Six-bit have a range of -32 to +31 in 2's complement.

Conversion from positive to negative integer is:
1) Invert all the bits.
2) Add 1.

so.....
Convert the two numbers to negative and add them. Overflow occurs if the MSB changes sign if the two addends are both positive or both negative.
Top of pagePrevious messageNext messageBottom of page Link to this message

Fast1075
Posted on Thursday, August 30, 2012 - 04:54 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

I didn't know Klingon could be directly translated to english ; ).
Top of pagePrevious messageNext messageBottom of page Link to this message

Reindog
Posted on Thursday, August 30, 2012 - 06:44 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

+8 = 001000
-8 = 110111 + 1 = 111000

+11 = 001011
-11 = 110100 + 1 = 110101

-8 + -11 = 111000 + 110101 = 101101 = -19

+19 = 010010 + 1 = 010011

No overflow occurred because the sign bit (the most significant bit of both addends was 1 (negative) and the sum is also 1 (negative))

I say we should hit them with photon torpedoes.

(Message edited by reindog on August 30, 2012)
Top of pagePrevious messageNext messageBottom of page Link to this message

Sifo
Posted on Thursday, August 30, 2012 - 07:34 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

Anyone familiar with the "Star Trek" game that was written for the old IBM 360 system? Nothing like gaming with only text I/O!
Top of pagePrevious messageNext messageBottom of page Link to this message

Fast1075
Posted on Thursday, August 30, 2012 - 07:45 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

Top of pagePrevious messageNext messageBottom of page Link to this message

Brumbear
Posted on Thursday, August 30, 2012 - 09:26 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

http://www.youtube.com/watch?v=kQC82okzTXI
Top of pagePrevious messageNext messageBottom of page Link to this message

Reindog
Posted on Friday, August 31, 2012 - 09:13 pm:   Edit Post Delete Post View Post/Check IP Print Post    Move Post (Custodian/Admin Only) Ban Poster IP (Custodian/Admin only)

Cataract2: Capiche?
« Previous Next »

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Post as "Anonymous" (Valid reason required. Abusers will be exposed. If unsure, ask.)
Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Tree View | Search | User List | Help/Instructions | Rules | Program Credits Administration