1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can someone help me out (math question)

Discussion in 'General' started by bHawk, 10 Jan 2004.

  1. bHawk

    bHawk What's a Dremel?

    Joined:
    5 Jan 2002
    Posts:
    370
    Likes Received:
    0
    Can someone explain to me how to convert from base 10 numbers to another base digit by digit. Like for example, if i wanted to convert base 10 to hex (base 16) lets say the highest number i can have is FFFF (or 65534 in base 10). Now if i were given the base 10 number 52301, how could i get what the first hex digit (on the left) is?
     
  2. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    65535 actually. Keep dividing by 16 until the answer is less than 16, then convert the integer part to hex (10=A, etc). Subtract the integer part and multiply by 16 for the next digit.

    52301=cc4d
     
  3. Murdoc

    Murdoc Gas Mask..ZOMG

    Joined:
    25 Jul 2003
    Posts:
    2,496
    Likes Received:
    1
    you could cheat and go here, it will convert a lot of different bases.

    Warning: contains hacking crap and porn adverts, sorry, hope ya dont mind, delete if you think it needs to be mods.

    'doc

    It is a bit naughty, here's a family version...
     
    Last edited by a moderator: 10 Jan 2004

Share This Page