Jump to content

can someone explain me hex ?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
The one who hunts elves

The one who hunts elves

    Newbie

  • Members
  • Pip
  • 1 posts
Hi

Soo I wanted to convert some hex into strings, but im getting jibberish as a result, so I figured those online converters must be broken & decided to learn how to do it myself &I read thiswiki article & I do not understand it. It says hex is numbers 0-9 & ABCDEF

Now an example hex is given: 2AF3

So according to what it says, in dec it should be 2 10 15 3

But then it says it 10,995

I ran this in the autoitscript like this : Result = 10995 without the comma WTF?

ConsoleWrite(2*16^3 + 10*16^2 + 15*16^1 + 3*16^0 & @CRLF)

there was a formula also, I do understand the formula , but I do not understand why is there a formula to begin with? I mean it clearly says A=10 so 2A should equal 210 not?

so wtf is going on? please explain someone.

ty


Edit: this is my hex string btw:
7F2132ED886411000002007F00214500-007D222A400073061E349F99A21D5432-31341CE7061AAB47B083F4B1021D5018-FF3C06C800001703010050980FB6BAB6-28D0539B19F888EA75D24A457F95AE53-5A8E95A0B002C4FD3756BDB253F26AD7-44173EE5E02008019B4670A90144BDFE-B978965DD49E0B82F5ED8B53CE4BBC80-04F80C73DCA065757188DC

Edited by The one who hunts elves, 15 May 2010 - 06:09 PM.


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Hex represents two distinct, but related, things.
1) A number encoding mechanism. Instead of the place values being powers of 10, they are powers of 16. To interpret a hexadecimal number, you multiply each digit by it's place value, and add the results. That's why you have the 16^3, etc.
2) A sequence of 8, 16, or 24-bit characters. 2 hex digits = one 8-bit character. You would then interpret the numbers based on the encoding scheme, such as ASCII.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
tossy

tossy

    Programmer

  • Members
  • PipPipPipPipPip
  • 202 posts
I heard that Hex is a board game played on a hexagonal grid, theoretically of any size and several possible shapes, but traditionally as an 11x11 rhombus.
Microsoft: "You've got questions. We've got dancing paperclips