Computing.Net > Forums > Programming > Hexadecimal to WORD conversion?

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.

Hexadecimal to WORD conversion?

Reply to Message Icon

Name: RWD1996
Date: July 6, 2006 at 17:48:27 Pacific
OS: Windows XP SP2
CPU/Ram: AMD Sempron 2600+ (1.6GHz
Product: Myself
Comment:

Hey guys, I'm trying to learn Binary and Hexadecimal math, and I would like to know how to convert a Hexadecimal number to WORD. Is this even possible, or do I have the facts messed up?

In the Frhed Hex Editor, I have a program opened. Examining the Hex code, I see a 00 in hex. Looking on the bottom on the status bar, I see that the WORD conversion is 512. How is this calculation achieved? Thanks for your inputs.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 6, 2006 at 18:46:01 Pacific
Reply:

It sounds far-fetched that 00 hex "converts" to 512 in any number system.

If you want to see the ASCII equivalent of hex bytes, get a chart or a hex editor/viewer.

This string:

40 65 63 68 6F 20 6F 66 66

in ASCII is:

@echo off


=====================================
If at first you don't succeed, you're about average.

M2



0

Response Number 2
Name: RWD1996
Date: July 6, 2006 at 21:42:01 Pacific
Reply:

You're right. 00 02 was what I was meaning to say...I was confused at the time I wrote it.

In Frhed, 00 02 is 512 in WORD. How is this calculation achieved? I thought 512 was 200 in Hexadecimal Notation. But 00 02 seems reversed than 200. I'm probably confusing you, but I'm confused myself.


0

Response Number 3
Name: IVO
Date: July 7, 2006 at 12:26:35 Pacific
Reply:

Hex notation is shorthand to handle binary digits and you do not have to confuse math with tech issues; i.e. you are right to say dec 512 is hex 0200 and that is stored in a word (two bytes), but x86 based microprocessors handle a word in a revere way: lowest byte comes first and then the highest. So what you read as word 0200 actually is stored as 0002 in RAM.

That is a tech issue related to memory architecture and has nothing to do with math.


0

Response Number 4
Name: RWD1996
Date: July 8, 2006 at 17:43:04 Pacific
Reply:

Ok, thanks very much!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







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: Hexadecimal to WORD conversion?

converting values of vb to word doc www.computing.net/answers/programming/converting-values-of-vb-to-word-doc/9875.html

decimal to binary conversion help!! www.computing.net/answers/programming/decimal-to-binary-conversion-help/4822.html

scan to word www.computing.net/answers/programming/scan-to-word/2905.html