• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How To: Interchange hex and dec-manually

BrainWave

A new idea sprouts
  • 239
    Posts
    19
    Years
    There's no thread to teach you how to do that yet, so......
    Oh, I've figured them out myself.

    First, remember at least 15 values of hex numbers. They a shown below:

    Hex---Dec
    1------1
    2------2
    3------3
    4------4
    5------5
    6------6
    7------7
    8------8
    9------9
    A------10
    B------11
    C------12
    D------13
    E------14
    F------15
    10----16

    And the list goes on......

    Now, for conversions
    Normally when you use a hex tools, you'd find all the hex values to be shown in pairs.
    Before any conversions, let a hex value be "xy"

    Dec--->Hex
    All you have to do is to multiply the x value by 16, then add y.
    For example, for AA, the x value is A (which is 10) and the y value is A (which is also 10)
    The dec. value=10(16)+10=170

    (p.s, can anyone use a hex-dec calculator or something to check whether it's correct?)

    Hex--->Dec
    It's pretty much straight forward. All you have to do is the divide the dec. value by 16. The quotient(sp?) is the x value and the remainder is the y value.
     
    Last edited:
    you could just you the calculator on your computer...change to scientific view then type your number, then click on the Hex box and it converts your number and vice-versa
     
    khaosknight1, that's a stupid post. It says manually. Not via computer ways. At least that's what I think this thread is for.
    I already know how to do this, but it's good that it'll appear here.
    Do you know how to go from Binary->Decimal? I can go from Decimal to binary, but I'm wondering how to do the reverse.
     
    khaosknight1, that's a stupid post. It says manually. Not via computer ways. At least that's what I think this thread is for.
    I already know how to do this, but it's good that it'll appear here.
    Do you know how to go from Binary->Decimal? I can go from Decimal to binary, but I'm wondering how to do the reverse.
    Isn't it like this:
    Code:
    10110 = 1*2^5 + 0*2^4 + 1*2^3 + 1*2^2 + 1*2^1 + 0*2^0
    I'm pretty sure that's right.

    I'm not sure how useful this thread is going to be for most people. Unless you can do it immediately in your head I can't really think of a reason why you wouldn't simply use a converter. However this thread might be quite good for the newer hackers who don't even know what hex is.
     
    khaosknight1, that's a stupid post. It says manually. Not via computer ways. At least that's what I think this thread is for.
    I already know how to do this, but it's good that it'll appear here.
    Do you know how to go from Binary->Decimal? I can go from Decimal to binary, but I'm wondering how to do the reverse.
    Bin -> Dec:

    Eg. 1001001
    1. Take first DIGIT from the sequence (now we have 001001 and 1)
    2. If there are any DIGITs left in the first NUMBER, double the second NUMBER (now we have 001001 and 2), otherwise stop.
    3. Take the new first DIGIT in the first NUMBER, and add it to the second NUMBER (now we have 01001 and still 2).
    4. Repeat 2 and 3 until you run out of DIGITs in the first NUMBER.

    So 1001001
    1. 001001 & 1
    2. 001001 & 2
    3. 01001 & 2
    2. 01001 & 4
    3. 1001 & 4
    2. 1001 & 8
    3. 001 & 9
    2. 001 & 18
    3. 01 & 18
    2. 01 & 36
    3. 1 & 36
    2. 1 & 72
    3. 73
    So 73 is your answer.

    To convert back from Dec to Bin...
    e.g. 45
    1. If the first NUMBER is odd, take 1 from it and add the digit "1" to the 2nd NUMBER, else add the DIGIT "0" to the 2nd NUMBER. (now we have 44 and 1)
    2. If the first NUMBER is not 0, half the first NUMBER. (now we have 22 and 1)
    3. If the first NUMBER is odd, take 1 from it and add the DIGIT "1" to the start of the 2nd NUMBER, else add the DIGIT "0" to the start of the 2nd NUMBER. (now we have 22 and 01)
    4. Repeat 2 and 3 until you run out of DIGITs in the first NUMBER.

    45
    1. 44 & 1
    2. 22 & 1
    3. 22 & 01
    2. 11 & 01 As you can see, I take 1 off this 11 in the next one...
    3. 10 & 101 ... and add it to the start of the binary.
    2. 5 & 101 Same with this one
    3. 4 & 1101
    2. 2 & 1101 ...But not this one, as it's even.
    3. 2 & 01101
    2. 1 & 01101
    3. 0 & 101101


    If this is hard to follow, I'm sorry!
    Spoiler:
     
    Last edited:
    khaosknight1, that's a stupid post. It says manually. Not via computer ways. At least that's what I think this thread is for.
    I already know how to do this, but it's good that it'll appear here.
    Do you know how to go from Binary->Decimal? I can go from Decimal to binary, but I'm wondering how to do the reverse.


    Oh sorry i thought this was just a thread to teach people to convert Hex and Dec, i didnt mean it the way it came out, my apologies to TC
     
    Back
    Top