Minor addition: after grabbing a single byte from the string, and adjusting for possible a-f, A-F, we still need to subtract '0' (30h, 48 decimal) to convert from a "character" to a "number".
For a more "general" method that will work for more than 2 digits...
grab a digit (character)
confirm that it's "valid"
convert from "character" to "number"
shift the "result so far" left by 4
"or" in the newly converted number
If you can't get it, show us what you're trying so far.
Best,
Frank