title: Why Two's Complement?
body: <p>I'm writing a tutorial to teach kids (ages 9 to 13) about programming. I started with computers themselves, they don't have that much to do with computer science, it's more about the process involved with a solution to a computational problem. </p>
  
  <p>With that starting point, I'm guiding them toward an understanding that machines can help us with certain computational problems. People are great at abstract thinking and imagination, but computers are AWESOME at following a well-specified routine. They can do it again and again, at amazing speed!</p>
  
  <p>Representing numbers in binary format has already been covered in my tutorial. But how do you represent negative numbers? There are so many ways to do this, in any notational system, but the system chosen for computers is for a very specific reason: to reduce the amount of machinery involved with adding signed integer values. We don't want to have to construct and build separate chips just to handle negative numbers, we want to use the same chips we have been using for natural number arithmetic!</p>
  
  <p>If someone asked you on the street (as totally unrealistic as this seems) "how do computers represent negative numbers, and why do they represent them this way?"</p>
  
  <p>My specific questions:</p>
  
  <blockquote>
    <ol>
    <li><p>How do computers represent negative numbers?</p></li>
    <li><p>Why do computers represent negative numbers this way?</p></li>
    </ol>
  </blockquote>
  
  <p>I would guess that this many experienced developers would have to think about this a bit. Some might not even be able to come up with an answer. I'm not trying to be pompous, this is from actual experience, I've asked professional developers this question and they can't answer it. They draw a blank stare. Give them JBoss and JavaBeans and they will steamroll you with confidence. So funny! I too struggle with this question, I have to remind myself of the answers every time and I need a piece of paper or white board to work out a solution. What I'm hoping is to guide students toward a better understanding of the machine they are working with.</p>