|


Comparing Numbers in Different BasesDate: 07/28/99 at 00:40:19 From: Agnes Morrison Subject: Bases other than 10 If I am given a number in base 4 and asked whether it is bigger or smaller than another number in another base, should I always convert both to base 10 to compare, or is there an easier way? Thank you.
Date: 07/28/99 at 12:41:18
From: Doctor Rick
Subject: Re: Bases other than 10
Hi, Agnes.
If you know how to convert a number in the other base to base 4
without converting it first to base 10, that _might_ be faster; you
can compare any two numbers in the _same_ base the same way you
compare numbers in base 10. But you'd have to know your base-4
multiplication tables really well for that to be easy. I would stick
with converting both numbers to base 10.
In some cases you might not have to do the whole conversion. Let's say
I need to compare 331 (base 4) with 304 (base 5). I know that
331 (base 4) < 1000 (base 4) = 64 (base 10)
I also know that
304 (base 5) > 300 (base 5) = 3*25 = 75 (base 10)
Putting these facts together, I know that
331 (base 4) < 64 (base 10) < 75 (base 10) < 304 (base 5)
so
331 (base 4) < 304 (base 5)
Also, I don't have to do _any_ conversion to know that
331 (base 5) > 304 (base 4)
Why? Because I know that
331 (base 5) > 331 (base 4)
Any numeral in one base is always greater than the same numeral in a
smaller base. If this isn't clear to you, write out the numbers in
expanded form:
331 (base 5) = 3*25 + 3*5 + 1
331 (base 4) = 3*16 + 3*4 + 1
Once you see this, it's obvious that
331 (base 4) > 304 (base 4)
Putting the facts together, I know that
331 (base 5) > 331 (base 4) > 304 (base 4)
so
331 (base 5) > 304 (base 4)
Does that help? These "shortcut" observations will help sometimes, but
converting both numbers to base 10 will always give you the answer.
- Doctor Rick, The Math Forum
http://mathforum.org/dr.math/
|
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]


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