Latest Diablo 3 News
DiabloWiki Updates
Support the site! Become a Diablo: IncGamers PAL - Remove ads and more!

Hex

Discussion in 'Off-Topic' started by eds01, May 5, 2005.

  1. eds01

    eds01 IncGamers Member

    Joined:
    Jun 26, 2003
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    86
    Hex

    Can ony one explain hexadecimal to me? There was a question on a final yesterday about it, we wernt taught about it, and even the teacher didnt know it, and its really bothering me.
     
  2. KnightFall

    KnightFall IncGamers Member

    Joined:
    Jul 7, 2003
    Messages:
    1,452
    Likes Received:
    0
    Trophy Points:
    165
    It's just another way of counting. Like Decimal or Binary.

    Normal numbers, 1-9 are to base 10. Hex numbers are to base 16.

    Decimal counts like : 1 2 3 4 5 6 7 8 9 10 11 Etc

    Hex counts like : 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D Etc

    So for example,
    A = 10
    F = 15

    But FF is not 15*15.
    FF = 255

    Does that help any? Not sure it will, find it hard to explain really...

    Edit : Can you remember the question? I would like to see if I could answer it...

    KnightFall
     
  3. KnightFall

    KnightFall IncGamers Member

    Joined:
    Jul 7, 2003
    Messages:
    1,452
    Likes Received:
    0
    Trophy Points:
    165
    Edit : Damn forums are rubbish for tables...

    Tring to find one which works...

    You will find decimal to hexadecimal conversion tables in most HTML manuals.

    KnightFall
     
  4. mhl12

    mhl12 IncGamers Member

    Joined:
    Jul 3, 2004
    Messages:
    3,970
    Likes Received:
    8
    Trophy Points:
    466
    taken from dictionary.com

    i know, not the best source but its the first one that popped in my mind.
     
  5. plasmo

    plasmo IncGamers Member

    Joined:
    Jul 1, 2003
    Messages:
    1,436
    Likes Received:
    1
    Trophy Points:
    255
    Here's the Wikipedia page on it; might be of some help. Good place to get a general idea about something before you start serious research. :)

    I usually use the code tag for tables:
    Code:
    Decimal counts like: 1 2 3 4 5 6 7 8 9 10 11 Etc
    Hex counts like:     1 2 3 4 5 6 7 8 9 A  B  C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D Etc
    Still have to preview it a couple of times to get it perfect, but it gets the job done.
     
  6. KnightFall

    KnightFall IncGamers Member

    Joined:
    Jul 7, 2003
    Messages:
    1,452
    Likes Received:
    0
    Trophy Points:
    165
    Ah! Thanks for the tip! Didn't remember there was a table thingie like that...

    KnightFall
     
  7. Chynobi

    Chynobi IncGamers Member

    Joined:
    Feb 11, 2004
    Messages:
    859
    Likes Received:
    0
    Trophy Points:
    120
    What are we talking about hex wise?

    Conversion? Ie Denery to Hex?
     
  8. eds01

    eds01 IncGamers Member

    Joined:
    Jun 26, 2003
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    86
    I'm mostly wondering about conversion, i.e. 100(hex) - 10(hex) = x(decimal) and figureing out how much it is. Any help with that?
     
  9. garublador

    garublador IncGamers Member

    Joined:
    May 28, 2004
    Messages:
    1,326
    Likes Received:
    0
    Trophy Points:
    105
    100 (hex) = 256 (decimal) 1 * 16^2 + 0 * 16^1 + 0 * 16^0 = 255
    10 (hex) = 16 (decimal) 1 * 16^1 + 0 * 16^0 = 16

    256 - 16 = 240
     
  10. Arokthis

    Arokthis IncGamers Member

    Joined:
    Jun 24, 2003
    Messages:
    426
    Likes Received:
    0
    Trophy Points:
    324
    On the assumption that you're running Windows, go to the calculator. (Start button, programs, accessories, calculator) Set it to "scientific" and enter the decimal number you want changed to hex. Switch it to hex and you will have the result. Voila!
     
  11. Merick

    Merick IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    6,862
    Likes Received:
    1
    Trophy Points:
    466
    I always liked Hex better than binary and octal, it just seems easier with a higher-than-10 base number system.
     
  12. Ev_

    Ev_ IncGamers Member

    Joined:
    Jun 22, 2003
    Messages:
    1,562
    Likes Received:
    1
    Trophy Points:
    467
    Because no one has explicitly said this yet (although garublador came close)...

    Hex works exactly the same way every number base works. Every digit in a number represents the number of times a certain power of the base is in the number. Starting from the decimal and moving left, the places are base^0, base^1, base^2, base^3, etc.

    So in our everyday number system (base 10), 292 means:
    (2 * (10^2)) + (9 * (10^1)) + (2 * (10^0))

    292 in hex would mean:
    (2 * (16^2)) + (9 * (16^1)) + (2 * (16^0)) = 658 (base 10)

    To write 292 (base 10) in hex:
    (1 * (16^2)) + (2 * (16^1)) + (4 * (16^0))
    or 124

    To write 292 (base 10) in binary:
    (1 * (2^8)) + (0 * (2^7)) + (0 * (2^6)) + (1 * (2^5)) + (0 * (2^4)) + (0 * (2^3)) + (1 * (2^2)) + (0 * (2^1)) + (0 * (2^0))
    or 100100100

    In octal, it's 444. I think you can probably figure out how by now.
     

Share This Page