Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 99595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:25:04+00:00 2026-05-11T00:25:04+00:00

X = 01001001 and Y = 10101010 If I want to add them together

  • 0

X = 01001001 and Y = 10101010

If I want to add them together how do I do that? They are ‘Two’s Complement’… I have tried a lots of things but I am not quite sure I am getting the right answer since there seems to be different type of rules.

Just want to make sure it is correct:
1. Add them as they are do not convert the negative
2. Convert the negative number you get and that’s the sum.

f.eks
01001001+10101010 = 11110011 => 00001100 => 1101 => -13

Or?
1. Convert the negative
2. Add them together and convert the negative

f.eks
01001001+10101010 => 01001001 + 01010110 => 10011111 => 01100001 => -97

So basically what I want to do is to take: X-Y, and X+Y
Can someone tell me how to do that?

Some resource sites: student-binary celtickane swarthmore

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:25:05+00:00Added an answer on May 11, 2026 at 12:25 am

    The beauty of two’s complement is that at the binary level it’s a matter of interpretation rather than algorithm – the hardware for adding two signed numbers is the same as for unsigned numbers (ignoring flag bits).

    Your first example – ‘just add them’ – is exactly the right answer. Your example numbers

    • 01001001 = 73
    • 10101010 = -86

    So, the correct answer is indeed -13.

    Subtracting is just the same, in that no special processing is required for two’s complement numbers: you ‘just subtract them’.

    Note that where things get interesting is the handling of overflow/underflow bits. You can’t represent the result of 73 – (-86) as an 8-bit two’s complement number…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer If PHP is configured at your host to run through… May 11, 2026 at 1:02 pm
  • added an answer In order for UIScrollView to determine the difference between a… May 11, 2026 at 1:02 pm
  • added an answer SharePoint Wiki out of the box does not support 'full'… May 11, 2026 at 1:02 pm

Related Questions

int x = n / 3; // <-- make this faster // for instance
def foo (): x = re.compile('^abc') foo2(x) def foo2(x): How do I get x
I tried x = y ** e, but that didn't work.
class A def initialize @x = do_something end def do_something 42 end end How
x = hello world.to_sym puts x.class This works and allows me to concatenate the
uint x = uint.MaxValue - 100; The above line causes visual studio to report
byte x = -1; for(int i = 0; i < 8; i++) { x

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.