Hi. Sorry if this has been asked already, tried searching FAQ, and found a similar question, but not what I was looking for. Anyway, I'm trying to take an array with characters that represent hexidecimal digits.. something like "104B" and save it in another char array. However, in this array I will need two hex digits stored in each element. So I have:
Code:
typedef char byte;
byte objectCode[4]; /* stores 4 bytes (8 hex digits) */
So using "104B" as an example I would need to have
objectCode[0] = 00010000 /* hex digits 10 in binary */
objectCode[1] = 01001011 /* hex digits 4b in binary */
I have no idea is there is a simple way to do this or not, any help would be greatly appreciated. Thanks.