Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Base 14 subtraction question

  1. Jul 1, 2011 #1
    I am trying to solve the following problem.

    It is not homework since I am just brushing up =) but I will try posting it here.

    I have the following base 14 subtraction problem:

    35 - AB = ?

    I can look up the answer, which is shown as 68 (base 14).

    But, for the life of my, I can figure it out...

    The problem I am having is that AB appears to be larger (?) than the 35?

    How do I subtract a larger number, from a smaller, and not end up with a negative number?

    I can figure out the first digit (8).

    Since B is larger, we gotta carry over from the 3A column, and we end up with 14+5 (=19) - B (=11), so we end up with 8.

    I get confused in handling the other column, which should now read 3 minus A (and the carried over 1).

    How does that turn into six?

    thank you.
     
  2. jcsd
  3. Jul 1, 2011 #2
    Subtracting a larger from a smaller will still give you a negative number, no matter what the base.

    The trick is to do just what you'd do in base 10. First, flip them around (write "AB - 35"). Then, negate your final result.

    In this case, once you do that, the math is straightforward. I get -76(base14). Are you sure the answer you've looked up is right?
     
  4. Jul 1, 2011 #3
    that is the answer the book has.

    I also suspect the answer is incorrect.

    I got the same answer as you.

    Here is the way they wrote the solution:

    35
    - AB
    1
    ------
    68
     
  5. Jul 1, 2011 #4
    ok figured it out...there was a trick that I did not know...

    1. apparently negative is not really allowed...

    35 - AB...(base 14)

    step one (from the right):
    subtract 5 - B.
    Since B is larger, we borrow from the left...
    5 + 14 = 19, then minus B (= 11 in base 14) == 8.

    step two: next spot over...we need to subtract A + 1 from 3. Since 3 is smaller, we need to borrow again, from the left.

    3+14 = 17 minus (A + 1 = 11) == 6.

    Per what I just found:

    # A negative difference requires several steps:

    * Add (in decimal in your head) the radix n to the difference you already computed. The result should no longer be negative.
    * Record the result as a base-n digit at the bottom of the same column.
    * Write a 1 as the borrow in the next column left.

    # Any extra borrow past the leftmost column is not recorded in the answer. It is called the borrow out and is usually stored somewhere else on the computer. The answer must have the same number of digits as the two operands.

    Thanks tho!

    Jalisco
     
  6. Jul 1, 2011 #5
    Ah, it sounds like you're doing modular arithmetic. Now it makes sense.

    Incidentally, note that 76 + 68 = 100 in base 14, showing the equivalence of the two answers.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Base 14 subtraction question
  1. Base 10 log question (Replies: 3)

Loading...