Ok, I know what they are. Byte is just one character(8 bit number), word is two characters(16 bit number), and dword is 4 characters(32 bit number). I know the ranges (assumes unsigned value)
byte - 0 to 255
word - 0 to 65535
dword - 0 to 4,294,967,295
I'm kind of confused on how I go about reading them. byte is simple, just get value, convert it into an ASCII code. Word is what throws me off. Get two chars, convert them into ascii codes, then multiply them together, right? Well,
255*255 = 65,025, NOT 65535.
What gives? I thought I had this figured out.
I think I'm close, but yet so far away. Any formulas are welcome. It's true I could take the two characters as their byte form, drop them to binary values, then combine the binary strings (keeping trailing 0's from both numbers, of course), and then convert that string back into a word value, but my code's pretty damn big as is, and that's like 20 more lines I'd have to write. I'd rather have a way to calculate the value right there on the spot, but if dropping to binary is the only way, it's cool. Just looking for a shortcut.
Thanks, C++ Gurus!!