• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Calling all EE's!

blustori

Senior member
Hi I have a question. Lets say we have two numbers A and B with B being in compliment form. If I were to subtract A-B would I first have to take the compliment of B and then add or do I just subtract them directly? This is confusing. The notation is if you want to do A - B, then its the same as adding A + B with B being in compliment form.
 
um....you know there's 1's compliment then there's 2's compliment, and please try explaining it clearer, no one understands what you're saying
 
Here let me make an example although I'm pretty sure I understand now. Lets say A = unsigned 0101 and B = signed 1001 with B already in 1's compliment form. Now if I were to do B - A, based on the notation, I would have to take the compliment of B and add it to A (same thing as B - A). My question was do you subtract directly or do you take the compliment of B when it is already in its compliment form and then add? Based on my thoughts, I am now very sure you ignore that B was in 1's compliment form and take the compliment of it anyway. Feel free to prove me wrong.
 
If I have to guess,

A - B = A + B

As for which compliment, you would have to convert B to B correctly.



P.S. Don't blame me if this is worng.
 
Back
Top