How do I handle base 14 subtraction with larger numbers?

  • Context: Undergrad 
  • Thread starter Thread starter jalisco
  • Start date Start date
  • Tags Tags
    Base
Click For Summary

Discussion Overview

The discussion revolves around performing subtraction in base 14, specifically addressing the problem of subtracting a larger number from a smaller one, as illustrated by the example of 35 - AB. Participants explore the mechanics of base 14 subtraction, including borrowing and handling negative results.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant expresses confusion about subtracting a larger number (AB) from a smaller number (35) and questions how to avoid a negative result.
  • Another participant suggests flipping the numbers and negating the result, asserting that subtracting a larger number from a smaller one will always yield a negative number.
  • A third participant agrees with the second and questions the validity of the answer found in a reference book.
  • One participant describes a method for handling the subtraction, detailing the steps of borrowing and how to compute the result without ending up with a negative difference.
  • Another participant notes the relationship between the two answers (76 and 68 in base 14) and suggests that they are equivalent in a modular sense.

Areas of Agreement / Disagreement

Participants express differing views on the validity of the reference answer and the approach to handling the subtraction. There is no consensus on the correctness of the answer or the method used, as some participants question the reference while others provide their own interpretations.

Contextual Notes

There are unresolved aspects regarding the handling of negative results in base 14 subtraction and the implications of borrowing across columns. The discussion reflects varying levels of understanding of modular arithmetic and its application in this context.

jalisco
Messages
3
Reaction score
0
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 got to 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.
 
Mathematics news on Phys.org
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?
 
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
 
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
 
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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 19 ·
Replies
19
Views
29K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K