- #1
Labyrinth
- 26
- 0
I am using c++ and trying to parse two characters from a string into a single hexadecimal number.
For example part of the string goes 'AB'. I want to state that A is 8, and B is 0xc (0xc), but then assign both of these into a single value to form a unique number: 0x8c
This is because I am trying to save space with a 1 byte char (8 bits), having the parser effectively write to each 4 bit block (nibble) to be considered separately later.
If I cannot do this using c++ can it be done using assembly?
Thanks in advance for any help.
For example part of the string goes 'AB'. I want to state that A is 8, and B is 0xc (0xc), but then assign both of these into a single value to form a unique number: 0x8c
This is because I am trying to save space with a 1 byte char (8 bits), having the parser effectively write to each 4 bit block (nibble) to be considered separately later.
If I cannot do this using c++ can it be done using assembly?
Thanks in advance for any help.