Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

Binary Subtraction


Date: 03/25/2002 at 01:03:54
From: Robert
Subject: Binary Subtraction

I have checked the examples given on binary subtraction, but I keep 
getting lost when doing the following:

   1011000 - 110010

I know from the 2^0 column that 0-0 = 0. Then in the 2^1 column I need 
to borrow, but I can't borrow from the 2^2 column, so I borrow from 
the 2^3 column, which messes everything up. Can I be guided through 
this example? I think it involves a 'next power' borrow, which I have 
not well understood.


Date: 03/25/2002 at 12:31:34
From: Doctor Peterson
Subject: Re: binary subtaction

Hi, Robert.

This requires exactly the same trick that you use to subtract 99 from 
100 in decimal; if you have never quite been solid on that, then you 
will have trouble here. Here is an explanation I've given for young 
children, which you may enjoy:

   Borrowing in Subtraction
   http://mathforum.org/dr.math/problems/christy12.1.98.html   

Let's do it; I'll label the columns to make it easier:

      g  f  e  d  c  b  a

      1  0  1  1  0  0  0
    -    1  1  0  0  1  0
    ---------------------
                        0

Now you have to borrow from column c in order to have enough in column 
b. There is nothing there to borrow, so column c has to borrow from 
column d. We'll do the latter first, adding binary 10 (decimal 2) to 
column c:

               0 10
               /  /
      1  0  1  1  0  0  0
    -    1  1  0  0  1  0
    ---------------------
                        0

Now we can borrow from c and subtract these columns:

                  1 10
                  /  /
               0 10
               /  /
      1  0  1  1  0  0  0
    -    1  1  0  0  1  0
    ---------------------
               0  1  1  0

The rest is easy.

If you prefer, you can write decimal digits for your borrows:

                  1  2
                  /  /
               0  2
               /  /
      1  0  1  1  0  0  0
    -    1  1  0  0  1  0
    ---------------------
               0  1  1  0


- Doctor Peterson, The Math Forum
  http://mathforum.org/dr.math/   
    
Associated Topics:
High School Number Theory

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/