1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help! Convert base 17 - base 15

  1. May 15, 2013 #1
    1. The problem statement, all variables and given/known data
    Convert (1G8A.23) base 17 into it's equivalent in base 15.

    2. Relevant equations



    3. The attempt at a solution

    How would I go about doing this?

    I haven't worked with letters yet so the only way I would know of is dividing 1G8A individually by the target base and take the numbers after the decimal and multiply it by the target base. But does that mean I need to convert the 1G8A to decimal first?
     
  2. jcsd
  3. May 15, 2013 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    When in doubt, converting to decimal is always a good choice, at the very least because that's what you have developed most intuition for.

    There's probably some trick observing that every unit < F in base 17 corresponds to the same unit in base 15, which allows you to do the conversion directly. For example, 8A17 = (8 * 17 + 10 = 8 * (15 + 2) + 10)10 = (8 * 15 + (10 + 16))10, where (10 + 16)10 is 1B15 so 8A8A17 = (80 + 1B)15 = 9B15. I'd go with the decimal intermediate step :)
     
  4. May 15, 2013 #3
    I attempted it with decimal as the intermediate step. I can't figure out what I did wrong, I used an online converter that shows 1G8A = 9683 in base 10 = 2D08 in base 15. (Wouldn't let me use decimals).

    When I did my calculations I got:
    1G8A.23 base 17 =

    4913+4624+136+10 + 0.128
    = 9683.128 (This part seemed right).

    Now when I go from this decimal base 10 to base 15, I got:
    9683.128:
    9683 / 15 = 625 (R = 8) .128 * 15 = 1.92
    625 / 15 = 41 (R=10) .9 * 15 = 13.5
    41 / 15 = 2 (R = 11) .5 * 15 = 7.5
    2 / 15 = 0 (R = 2)

    Based on this my answer is:
    2=2
    11 = B
    10 = A
    8 = 8

    So, 2BA8.1D7 base 15. How did I get it wrong, suppose to be 2D08?

    *Edit sorry! I'm an idiot, it's 645 not 625.
     
    Last edited: May 15, 2013
  5. May 15, 2013 #4

    Mark44

    Staff: Mentor

    So all is good?
     
  6. May 15, 2013 #5

    Mark44

    Staff: Mentor

    Since you're converting to base-15, it's useful to list a few powers of 15
    151 = 15 (duh!)
    152 = 225
    153 = 3375
    154 = 50625

    Since 1G8A17 = 968310, we can see that it is larger than 153, but smaller than 154. Also, 2*153 < 9683 < 3*153, so the first digit of the base-15 number will be 2, as in 2XXX.

    To get the 2nd digit, subtract 6750 (= 2 * 153) from 9683 to get 2933. The largest multiple of 225 (= 152) that is smaller than 2933 is 2925, which is 13 * 225. This makes the second digit 13, or D15. So far, the number is 2DXX.

    After subtracting 2925 from 2933, we get 8, which is smaller than 15, so the third digit is 0. We now have 2D0X.

    The last digit is 8, making the number 2D0815.
     
  7. May 15, 2013 #6

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    I spent a few minutes thinking about a more clever way to do this, but all I really came up with was the following:
    Code (Text):

    1 G 8 A
    ======
          A   10 x 1 x 2^0
    ----------
        8     8 x 1 x 2^0
        1 1   8 x 1 x 2^1
    ----------
    1 1       16 x 1 x 2^0
      4 4     16 x 2 x 2^1
        4 4   16 x 1 x 2^2
    ----------
    1         1 x 1 x 2^0
      6       1 x 3 x 2^1
        C     1 x 3 x 2^2
          8   1 x 1 x 2^3      +
    ================
    2 D 0 8
     
    where the products to the right n x b x dk are formed from the number n in the current position, b is a binomial coefficient and d is the difference between the bases (17 - 15 = 2). If a number doesn't 'fit' in the column in base 15, carry to the column to the left (e.g. 8 x 1 x 2^1 = 16, so write 1 and carry 1 to the left). In the end just add up the numbers as you would normally, except instead of writing 0 and carrying 1 when you get 10, you now do so when you get 15 :)

    Maybe this will help; maybe this will look like black art, in which case please pretend I did not post it.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Help! Convert base 17 - base 15
  1. Java - 15 Puzzle (Replies: 8)

  2. Maple 17 (Replies: 3)

Loading...