Building a Computer 1000: Subtraction

First off, here is a photo of what we have so far for our four-bit adder:

Nothing is glued down and we still have holes to cut and more pieces to cut out.

Last night my nine-year-old was asking more about subtraction. He had made a chart of four-bit binary representations of negative numbers. It started like this:

1    2    3    4    5
0001 0010 0011 0100 0101
------------------------  etc
1111 1110 1101 1100 1011
-1   -2   -3   -4   -5

With some prodding he found the pattern that -2 is the same 1 only with 1s replaced with 0s and 0s replaced with 1s. Likewise for -3 and 2, -4 and 3, -5 and 4, etc. Another way to say this is that you can get -3 from 2 by flipping all of the bits, and similarly for the other pairs.

Next I had him try the following process: Take two positive numbers. Write them out as four-bit binary numerals. Flip all of the bits of the larger one. Add the original smaller number and the bit-flipped number together. Flip all of the bits of the result. He did the following example

1:  0001
2:  0010

bit flipped 2:

add:  1  <-(carry)

flip bits of result:

The result is the binary representation of one, which is the difference 2-1. Here’s another example:

8:  1000
3:  0011

bit flipped 8:

add: 111  <-(carries)

flip bits of result:
    0101 = 5

So we have to figure out how to flip bits with marbles.

This entry was posted in computers. Bookmark the permalink.

One Response to Building a Computer 1000: Subtraction

  1. Pingback: Building a Computer 1100: Multiplication and Subtraction with an Adder « MATH with my KIDS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s