Computing.Net > Forums > Programming > Hex code?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Hex code?

Reply to Message Icon

Name: Hans
Date: September 10, 2003 at 15:54:59 Pacific
OS: WinXp pro
CPU/Ram: 2,2/512
Comment:

There is this gay who write Joke-messages to me with codes like this: 26111145HEX 56562245HEX 32311645HEX.
But this gives no mening to me if I convert hex to Chr. So what can this code mean? Any idea?



Sponsored Link
Ads by Google

Response Number 1
Name: eric
Date: September 10, 2003 at 19:54:53 Pacific
Reply:

How do you convert hex into letters anyhow


0

Response Number 2
Name: Don Arnett
Date: September 10, 2003 at 21:16:35 Pacific
Reply:

First, you need to know what character system the numbers are supposed to be using. The value for the letter 'A' is 65 decimal (41 hex) in ASCII, but something like 192 decimal (C0 hex) in EBCDIC. I could be way off on the EBCDIC value, because it's been a while. The point is, saying 41hex without knowing the character set, means nothing.

It's probably a safe assumption that your friend is using ASCII. Although if he/she is, I'd say that they don't know what they are doing.

In ASCII, printable characters range from 20hex to 7Ehex, so it would appear that there are very few printable characters in the above messages. Another clue that the 'code' isn't ASCII printable characters represented in hex is that there are no 'digits' in the A - F range.

When representing ASCII characters in hex, typically you'd list each character as a two digit number. So I might list my name (Don) as 446F6E, where 44 is the hex value for an ASCII 'D', 6F is the hex value for an ASCII 'o', 6E is the hex value for an ASCII 'n'.

Note, the 'value' of the ASCII character 'D' is the same whether you represent it in decimal, hex, octal or any other number system. The ASCII value for 'D' is 68 decimal, 44 hex, 104 octal, or 125 base 7. All of those are the same number, just represented in different number systems (68 == 44hex == 104octal).

To convert numbers to letters, you need to know the 'base' of the numbers (decimal, hex, octal, etc), the character set (ASCII, EBCDIC, etc) and then you need a chart/table of the character set, ie 68 == 'A', 69 == 'B', 111 == 'o', 32 == space, etc (in ASCII).



0

Response Number 3
Name: Infinite Recursion
Date: September 10, 2003 at 23:46:24 Pacific
Reply:

Ahhhh. The good ole days of number systems... I didn't trade "secret codes" with anyone though :( no fair.

Don... Base 7? What would be a good name for that? How about Sevtal, since Base 8 is Octal?

I agree, isn't ASCII (if it is, its garbage)
for the reason Don mentions "Another clue that the 'code' isn't ASCII printable characters represented in hex is that there are no 'digits' in the A - F range."

Wonder what the base could be? hmmm. Wonder if it is just random junk... or a brain teaser...

Oh... When I had an Intro to Artificial Intelligence class in college our first assignment was a number sequence... 10 points to who ever can tell me the next sequence of numbers after the last one that I list...

1
11
21
1211
111221
312211
13112221
1113213211
31131211131221

(there ya go... so what is the next number sequence? anyone??? (this should be interesting))

Infinite Recursion


0

Response Number 4
Name: Hansemann
Date: September 11, 2003 at 16:41:28 Pacific
Reply:

Well, I think this is a brain teaser as this gay who are sending me the messages say's they have a meaning. He is Norwegian, so if they means something it will be in Norwegian.
Thanks.


0

Response Number 5
Name: Don Arnett
Date: September 11, 2003 at 17:13:57 Pacific
Reply:

Hans

I assume that you mean 'guy' rather than 'gay'.


0

Related Posts

See More



Response Number 6
Name: Hans
Date: September 11, 2003 at 17:27:10 Pacific
Reply:

Ups!!
Well, since he keep sending me these messages I'm not sure what to call him! *lol*


0

Response Number 7
Name: Eric
Date: September 11, 2003 at 18:35:28 Pacific
Reply:

God I'm so stupid. I got this answer while writing a letter to I.R. lol.

13211311123113112211
Btw I.R. I wrote a 2 on the second number on accident :P

have fun :)
gl to the other people who haven't figured this out hope I didn't give anything away ;)



0

Response Number 8
Name: Infinite Recursion
Date: September 11, 2003 at 19:48:57 Pacific
Reply:

Eric,

You know when I first was given that assignment, I was throwing all sorts of math algorithms at it trying to solve it (afterall this was a senior level AI class)... when you derive the next sequence and realize what it is, it makes you feel kinda stupid doesn't it? :)

You're right, the next number in the sequence is 13211311123113112211. Anyone know the one after this one? lol

lol

Infinite Recursion



0

Response Number 9
Name: Eric
Date: September 11, 2003 at 21:32:40 Pacific
Reply:

I know I know :D. Thats crazy stuff huh? lol great brain teaser. Excellent. So did you get it? Or did the teacher have to tell you ;). I narrowed it down though in that E-mail without even knowing. Where the hell did that come from :D

*high five* rofl :)


0

Response Number 10
Name: Infinite Recursion
Date: September 11, 2003 at 22:30:02 Pacific
Reply:

Eric,

I just now realized you email regarding that question... lol. I don't check that account very often. My apologies...

Yeah, its some crazy stuff for sure. With the scale of the differences in each number sequence I initially racked my brain trying to solve it mathematically, because "it has to be hard". Yet, the solution is quite simple... I came across it at 2am the day it was due, had two days to work on it and others (like the 8 Queens Chess problem).

I sent an email to let you how I think this particular "brain teaser" surfaced and what technologies it followed... the email was sent instead of posting it here, don't want to ruin the fun of others trying to figure out the sequence... lol.

At any rate, this concept is a fairly lengthy tangent away from the thread concept at hand... so I will my final comments on it on monday, to give everyone ample time to view it and check it out.

I guess the "brain teaser" came to mind when I started thinking about numeric systems and bases... lol, my apologies for the tangent everyone...

IR


0

Response Number 11
Name: Eric
Date: September 11, 2003 at 23:39:53 Pacific
Reply:

Get AIM?! no? For me?!

Oh yeah I've never actually tried and sat down to solve the 8 queen on a chess board. I'll go do that later. HW time :(

Thats mah boy.


0

Response Number 12
Name: Infinite Recursion
Date: September 14, 2003 at 21:24:36 Pacific
Reply:

As promised here is how its done... for all of you who have emailed me, glad you gave it some thought ;)

---
Each line defines the line above it... Like run length encoding, etc.

notice

1 // nothing above this line
11 // line above this has one 1
21 // line above this has two 1s
1211 // line above this has one 2 and two 1s

Its quite interesting and the results can get fairly long.

After 13211311123113112211

you have...

111312211331121321132112211
then...
3113112221232112111312211312212211
then...
13211321321112131221123113112221131122112221
then...etc.

you get the idea ;)

Thanks for your interests..

IR


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Hex code?

Hexadecimal to WORD conversion? www.computing.net/answers/programming/hexadecimal-to-word-conversion/14507.html

It possible to open an .exe file ? www.computing.net/answers/programming/it-possible-to-open-an-exe-file-/10804.html

C++: Convert Multibyte buffer to integer www.computing.net/answers/programming/c-convert-multibyte-buffer-to-integer/1659.html