PDA

View Full Version : Hex Codes??


sheepydee
22-03-09, 18:31
does anyone know how to read HEX codes ? this is really important yet i have no idea how to read it , and i dont know how to translate it or anything :( ,

any help much appreciated

Punaxe
22-03-09, 18:34
Go to the Windows calculator (Start -> Run -> calc), make sure the View is set to Scientific, select Hex (or press F5), type the hex code, and select Dec (or press F6).
This is of course assuming the hex code is a number; if it's text, use a converter (http://centricle.com/tools/ascii-hex/).

If you want to know how to read it yourself, the Wikipedia article (http://en.wikipedia.org/wiki/Hexadecimal) is always a good place to start.

jamieoliver22
22-03-09, 18:34
As in hex colour codes? Or hexadecimal?

I can read some hex colour codes, I know a few primary colours and mostly greys.

sheepydee
22-03-09, 18:53
Go to the Windows calculator (Start -> Run -> calc), make sure the View is set to Scientific, select Hex (or press F5), type the hex code, and select Dec (or press F6).
This is of course assuming the hex code is a number; if it's text, use a converter (http://centricle.com/tools/ascii-hex/).

If you want to know how to read it yourself, the Wikipedia article (http://en.wikipedia.org/wiki/Hexadecimal) is always a good place to start.

Well for instance one of them was 7F so i put that in and it turned into 127 , but how am i supposed to know what it means??

Punaxe
22-03-09, 19:03
Well, hex is base-16, as opposed to base-10 that we're used to.

0 to 9 = 0 to 9, but after that, A, B, C, D, E, F = 10, 11, 12, 13, 14, 15.

Decimal: 74 = 7x10+4
Hexadecimal: 7F = 7x16+F

sheepydee
22-03-09, 19:06
Well, hex is base-16, as opposed to base-10 that we're used to.

0 to 9 = 0 to 9, but after that, A, B, C, D, E, F = 10, 11, 12, 13, 14, 15.

Decimal: 74 = 7x10+4
Hexadecimal: 7F = 7x16+F

O.o , im starting to understand a little :ton: but so...
Hexadecimal: 7F = 7x16+F

would that mean 7F = 7x16+127??

pardon my idiocy if im wrong as usual

AODdigger
22-03-09, 19:09
We studied this in 6th grade. Systems. I sucked really bad at them and PCs suck at 16oal systems...

Punaxe
22-03-09, 19:09
No, 7F = 7x16+F, and F=15, so 7F=7x16+15 = 127. Just 7x16 is only 112.

gidierre
22-03-09, 19:09
get one of the free hex editors available
there's nothing like starting to use it to get the gist of it all

(this way you''ll also be able to unveil the mystery behind punaxe's signature :p:p)

if you're thinking about something like disassembling machine code to read assembly operands, though, hex editors are just the beginning of a long journey ;)

AODdigger
22-03-09, 19:11
Sorry it's in Bulgarian. This helped me a while ago:

http://www.constructor.bg/mk/numbers.htm

sheepydee
22-03-09, 19:36
D= this is really confuzzling but i cant give up because this is extremely important =S

AODdigger
22-03-09, 19:38
If you want I can translate a little from the site (:?

sheepydee
22-03-09, 19:48
If you want I can translate a little from the site (:?

yeas please =)

AODdigger
22-03-09, 19:54
I'm starting from the top, window by window.

Converting between Two Different counting systems

Enter a number in the fields of one counting system (Hex, Decimal, etc) to convert to another one by pressing Превърни; to clear the fields press "Изчисти"

(the systems: decimal, hex, etc and their fields.)

Secondary counting system BINARY
Eight-al (octal) counting systam OCTAL
Ten counting system (which is in fact the system we use today everywhere, except the PCs, they use binary) DECIMAL
And the sixteen countable system (HEX)
and their formulas below.

/I'll translate the definition too if you want/

sheepydee
22-03-09, 19:58
oh my , =S im still kinda confused :( =S

AODdigger
22-03-09, 20:00
Ok. Chill. What don't you get?

sheepydee
22-03-09, 21:20
Ok. Chill. What don't you get?

well its just that all these numbers ahhhhhh! lol , like punaxe said all this stuff about 7F=7x16 or suttin its all just confusing =S

Phys
22-03-09, 21:59
Ah I recently had to learn about this, Octal, and Binary in my computing course at college last week.

Punaxe
22-03-09, 22:10
well its just that all these numbers ahhhhhh! lol , like punaxe said all this stuff about 7F=7x16 or suttin its all just confusing =S

Let me try to explain a bit longer.

Take our own decimal (base-10) system. The number 1234 has a value of:

4x1 +
3x1x10 +
2x1x10x10 +
1x1x10x10x10
= 1234

Now this same number in hex (base-16), would mean:

4x1 +
3x1x16 +
2x1x16x16
1x1x16x16x16
= 4660

Right? Decimal uses multiplications of 10 (1, 10, 100, 1000), hexadecimal uses multiplications of 16 (1, 16, 256, 4096). When we start counting decimally we have the numbers 0 to 9, and after we reach 9, we have to use two figures: one to indicate how many times we already counted to 10, and one to indicate how far we're already on our way to one more time counting to 10. Then when this second figure reaches 9, we have to use yet another figure: to indicate how many times we've counted to hundred.
Because hexadecimal uses multiplications of 16, we have to able to count to 16 using only one figure. That's where the alphabet comes in handy: after 9, hexadecimal continues with A (10), B (11), C (12), D (13), E (14), and F (15). When counting, after we reach F, we have to use a second figure to indicate how many times we've already counted to 16, and so on.

Counting to 32 in hex:
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, 1E, 1F, 20

spikejones
22-03-09, 22:26
does this have anything to do with this:
http://www.tombraiderforums.com/showthread.php?t=148904

looking at things in HEX editor will help you to decipher things - but you damn well better have some inlinking of what you should be looking for. It may be a database file with specific headings indicating a new field etc.. or it may simply be HEX view of encrypted data. Hard to tell. But if you want to learn to reverse engineer things, you should learn firstly how to engineer things. to be honest, it is all beyond my understanding on how to read files in a HEX editor, unless it is a cell phone seem edit I need to do (and someone tells me the offset to alter, and what it needs to be) or else eding BREW file color codes in HEX editor. anyhow... give Dusan or gidierre a holler. One of them may have a good idea of what you are looking at. ;)