bwend
Newbie level 2
I have a C programming task to do, and need some assistance with this part.
I have a string, for example: 02e0
I need to convert this string to BCD, then back into its original format, by subtracting '0' and shifting.
I run into problems when hitting the 'e', my method sees this:
101 - 48, and hence stores '5' (decimal 53). However I need to retrieve this character back as its original hex 'e' value.
Does anyone have any suggestions?
I have a string, for example: 02e0
I need to convert this string to BCD, then back into its original format, by subtracting '0' and shifting.
I run into problems when hitting the 'e', my method sees this:
101 - 48, and hence stores '5' (decimal 53). However I need to retrieve this character back as its original hex 'e' value.
Does anyone have any suggestions?